• Login
Community
  • Login

How to style URL?

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
4 Posts 2 Posters 243 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I
    IstvanZachar
    last edited by Dec 16, 2024, 12:31 PM

    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?

    P 1 Reply Last reply Dec 16, 2024, 2:27 PM Reply Quote 0
    • P
      PeterJones @IstvanZachar
      last edited by Dec 16, 2024, 2:27 PM

      @IstvanZachar ,

      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):
      11e5dae8-49e8-4bc2-942f-59c896332491-image.png
      … 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.

      I 1 Reply Last reply Dec 17, 2024, 10:52 AM Reply Quote 1
      • I
        IstvanZachar @PeterJones
        last edited by Dec 17, 2024, 10:52 AM

        @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.

        I 1 Reply Last reply Dec 21, 2024, 4:33 PM Reply Quote 0
        • I
          IstvanZachar @IstvanZachar
          last edited by Dec 21, 2024, 4:33 PM

          @IstvanZachar Issued a feature request for styling URL-s here .

          1 Reply Last reply Reply Quote 0
          2 out of 4
          • First post
            2/4
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors