Community
    • 登入

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

    已排程 已置頂 已鎖定 已移動 Help wanted · · · – – – · · ·
    4 貼文 3 Posters 3.5k 瀏覽
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • Chris SwinneyC
      Chris Swinney
      最後由 編輯

      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 條回覆 最後回覆 回覆 引用 0
      • Gerd MüllerG
        Gerd Müller
        最後由 編輯

        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 條回覆 最後回覆 回覆 引用 0
        • Chris SwinneyC
          Chris Swinney
          最後由 編輯

          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 條回覆 最後回覆 回覆 引用 0
          • tomas-chrastinaT
            tomas-chrastina
            最後由 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 條回覆 最後回覆 回覆 引用 0
            • 第一個貼文
              最後的貼文
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors