Community
    • Login

    Syntax highlighting question, have "hyperlinks" receive different color thank texts between double quotes

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 2.3k 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.
    • Ohayo GosaimasO
      Ohayo Gosaimas
      last edited by Ohayo Gosaimas

      Hello!

      I’m trying to customize the syntax highlighting in Notepad++, and there’s one precise thing that would really help me on a daily basis.
      That would be to be able to give hyperlinks a different color (in HTML and PHP documents), compared to all the other texts placed between double quotes.

      An example.
      Take:
      <p style="text-align: center;"><a href="http://www.notepad-plus-plus.org/" title="a title">

      In that one, at least in my case (I tested with a variety of preinstalled N++ themes, and asked the program to believe my document was written in many popular languages, same deal every time), the

      • "text-align: center;"
      • "http://www.notepad-plus-plus.org/"
      • "a title"

      … are all displayed with the same color.

      Ideally, it would be quite useful (well… to me) to have the styling and the hyperlinks displayed in a different color.

      I searched all I could, but failed how to achieve it.

      And yet, I see a glimmer of hope. Scintilla seems able to recognize hyperlinks, as this wiki page http://docs.notepad-plus-plus.org/index.php/Clickable_Links shows that there is an “URL hovered” category in the global styles for the default theme of N++.
      So… maybe not all hope is lost =)

      (The context, if you care… I’ll be frank, I tried Atom and Sublime Text, and it felt like a kick in the nuts in terms of visual “pleasure” of use, my eyes felt much less fatigue and found faster whatever they wanted. So I decided, it was time for me to try to improve my settings for N++. I switched to a different N++ theme, tried fonts and copied the one of Atom, although it was surprising to see it handled the font display differently, shamelessly copied some color settings from the other editors… and now, it’s another feature I want to copy, the syntax highlighting.)

      If you have an idea to achieve this, giving hyperlinks a different color from all the other texts between double quotes, I’ll be most grateful.
      Thank you!

      Claudia FrankC 1 Reply Last reply Reply Quote 0
      • Claudia FrankC
        Claudia Frank @Ohayo Gosaimas
        last edited by

        @Ohayo-Gosaimas

        if you want such behaviour than it must be implemented into the lexer(s).
        Afaik this is part of scintilla.

        Cheers
        Claudia

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