Community
    • Login

    Is ther ea way to setup permanent text highlighting with differnt colours for phrases (or possible plug in)?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 3 Posters 3.2k 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.
    • Chris SwinneyC
      Chris Swinney
      last edited by

      Hi all,

      I work with a lot of log file that contain certain phrases that indicate errors and the like. Is there a way to set-up phrases so that they are highlight on opening a file?

      I know you can mark text, bu this is not quite what I’m after.

      Different phrases should be able to be marked in different colours.

      Many thanks

      Chris

      1 Reply Last reply Reply Quote 0
      • Gerd MüllerG
        Gerd Müller
        last edited by

        you can use syntax highlighting. Define your own language with the phrases you want. You have 8 keyword groups (for 8 different colors or styles) with unlimited phrases. If you use a special ending for your files, you can define this for your own language and N++ will open this files with your defined syntax. Otherwise (i.e. for txt or something other) you must change the language with 2 clicks.

        1 Reply Last reply Reply Quote 0
        • Chris SwinneyC
          Chris Swinney
          last edited by

          Thanks Gerd Müller,

          Right, I’m obviously do something wrong as I am unable to see the Keywords I set show up as as style.

          I Define an new Language, open the Keywords List, A a phrase that I want highlighted (i.e. Level=“ERROR”), set the style (e.g. background colour), and then set the current document as using that Language, but I see nothing.

          There is obviously more I need to do, but I could not find any documentation.

          1 Reply Last reply Reply Quote 0
          • tomas-chrastinaT
            tomas-chrastina
            last edited by tomas-chrastina

            Hi,

            I assume problem is with quote character, as it’s special character while defining multi-part keyword. You need to escape it using \(backslash). Define your keyword group like:

            Level=\"ERROR\"
            

            Also here you can find UDL documentation -> UDL2.0.


            Best regards,
            Tomas.

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