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.9k Views 2 Watching
    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 Offline
      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 Offline
        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 Offline
          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 Offline
            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

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors