Navigation

    Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    User Defined Language coloring whole line

    Help wanted · · · – – – · · ·
    3
    3
    700
    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 Qu
      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 palypse 1 Reply Last reply Reply Quote 0
      • PeterJones
        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 palypse
          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
          Copyright © 2014 NodeBB Forums | Contributors