• Login
Community
  • Login

User Defined Language coloring whole line

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
3 Posts 3 Posters 1.8k 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.
  • R
    Raghad Qu
    last edited by Dec 9, 2018, 10:22 AM

    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

    E 1 Reply Last reply Dec 9, 2018, 11:53 PM Reply Quote 0
    • P
      PeterJones
      last edited by PeterJones Dec 9, 2018, 9:15 PM Dec 9, 2018, 9:15 PM

      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
      • E
        Eko palypse @Raghad Qu
        last edited by Dec 9, 2018, 11:53 PM

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