Community
    • Login

    Change Color of Hyperlinks in Text File (Not Just on Hover)

    Scheduled Pinned Locked Moved General Discussion
    6 Posts 4 Posters 2.0k Views 2 Watching
    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.
    • DeeTNBlazerD Offline
      DeeTNBlazer
      last edited by

      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

      Alan KilbornA PeterJonesP 2 Replies Last reply Reply Quote 0
      • Alan KilbornA Alan Kilborn referenced this topic on
      • Alan KilbornA Offline
        Alan Kilborn @DeeTNBlazer
        last edited by

        DUPLICATE

        1 Reply Last reply Reply Quote 1
        • PeterJonesP Online
          PeterJones @DeeTNBlazer
          last edited by PeterJones

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

          DeeTNBlazerD 1 Reply Last reply Reply Quote 2
          • DeeTNBlazerD Offline
            DeeTNBlazer @PeterJones
            last edited by DeeTNBlazer

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

            EkopalypseE 1 Reply Last reply Reply Quote 0
            • EkopalypseE Offline
              Ekopalypse @DeeTNBlazer
              last edited by

              @DeeTNBlazer

              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…

              1 Reply Last reply Reply Quote 3
              • DeeTNBlazerD Offline
                DeeTNBlazer
                last edited by

                The two solutions given here solved my issue. Thank you so much to the contributors!!

                1 Reply Last reply Reply Quote 1

                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
                • First post
                  Last post
                The Community of users of the Notepad++ text editor.
                Powered by NodeBB | Contributors