Community
    • Login

    User Defined Language coloring whole line

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 3 Posters 1.7k 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.
    • Raghad QuR
      Raghad Qu
      last edited by

      I defined User-defined language for notepad++ , that colors ‘Error’ in red while colors ‘Note’ in blue .
      Can I make it colors the whole line that contains the word ‘Error’ ?
      For example I have this line :
      “Error : initialized Failed!”
      I now get it with red ‘Error’ whereas the rest of the line in the default color ,
      can I get the whole line in red color ? All the lines that contains the wrod Error regardless the position of the word ‘Error’ ?

      Thanks,
      Raghad

      Eko palypseE 1 Reply Last reply Reply Quote 0
      • PeterJonesP
        PeterJones
        last edited by PeterJones

        You could define Error as the prefix for single-line comments, which would allow the whole line to be colored.

        But that wouldn’t help if you really wanted “Error.$" in red and "Note.$” in blue.

        Some months back, @Claudia-Frank made some posts on a PythonScript-based lexer, as an alternative to the builtin UDL lexer, which allows defining styles based on regular expressions. I’ve never tried to use them, but in September, at the end of this other thread, I compiled a list of links to her posts about it. I’ve never tried implementing a regex-UDL using her solution, but it may be worth trying out – I’d recommend giving it a try.

        1 Reply Last reply Reply Quote 4
        • Eko palypseE
          Eko palypse @Raghad Qu
          last edited by

          @Raghad-Qu

          The current pythonscript plugin has even an example which looks like is what you are looking for.

          Eko

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