Change Color of Hyperlinks in Text File (Not Just on Hover)
-
Hello,
I am wanting to find a method to be able to change the text color of all hyperlinks in text files from the standard black, to a color of my choosing.
I know I can do this on hover, but my goal is to change the color of all hyperlinks in a text file so they are a different color before I even hover over them.
Is there any code, any macro, LuaScript, code, any other script, or any plugin that anyone is aware of or can make so I could do this?
I have searched the internet for the past many hours and haven’t been able to find a solution to this.
I greatly appreciate any help.
Thanks
-
-
-
@DeeTNBlazer said in Change Color of Hyperlinks in Text File (Not Just on Hover):
am wanting to find a method to be able to change the text color of all hyperlinks in text files from the standard black, to a color of my choosing.
Notepad++ does not have that feature built in.
Try the Enhance Any Lexer plugin, defining a color/regex pair like
0x0000FF = https?://(\S)*?
for text files to make normal links red. (The color and the exact regex are, of course, up to you to define to meet your own exact needs.) -
@PeterJones said in Change Color of Hyperlinks in Text File (Not Just on Hover):
0x0000FF = https?://(\S)*?
Hi, thank you for the reply. I installed that plugin and added that code, however, it only made the first part of the URL red, the https:// part. - Is there anyway to have the code detect the full URL and make it all red?
Maybe a way to signal the start of the URL with https:// and the end of it terminating with a slash / - So a link like this (minus the space) https:// link/ would be fully red.
If that is possible, please let me know.
Thanks!
-
removing the last
?
should give you the desired result.
But be aware that EnhanceAnyLexer works on lexer-specific documents for which it has been defined, ie,
if you have defined it for normal text,
it will not color it for, say, Python or C or php code etc… -
The two solutions given here solved my issue. Thank you so much to the contributors!!