How to style URL?
-
I can change the style of “URL hovered” in the global style definition I use, but there seems to be no way to restyle an unhovered URL. Can it be done?
-
You can control whether or not non-hovered URLs get an underline (Settings > Preferences > Cloud & Link), but you are right, there isn’t a Style to change the color of URLs that aren’t actively hovered.
You could follow our “FAQ: Feature Request” to put in an official Issue requesting a Style to control un-hovered URLs.
As a workaround, or until it gets implemented natively, you could try to use the EnhanceAnyLexer plugin to define a regex to match URLs (difficult, depending on how accurate you want the URL matching to be):

… but unfortunately, as can be seen, the EnhanceAnyLexer color overrides the URL-Hovered color for the text (but the underline keeps the URL-H color), so that might not work for you. But until N++ natively gives you a full Style for the non-hovered URL, it might be the best you can do. -
@PeterJones Thanks Peter for the information. I decided leave the global URL style as is, and defined some keywords in prefix form for my custom language for “http://…”. This way, I keep both the unhovered and hovered styles, with the minor issue that a prefix keyword eats e.g. the parenthesis at the end of “(http://…)”. I can live with that.
-
@IstvanZachar Issued a feature request for styling URL-s here.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login