Community
    • 登入

    Feature request: improvements to keyword highlighting (style tokens)

    已排程 已置頂 已鎖定 已移動 General Discussion
    7 貼文 6 Posters 9.2k 瀏覽
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • Zoltán KelemenZ
      Zoltán Kelemen
      最後由 編輯

      I use Notepad++ to skim through large amounts of log files and style tokens are a crucial feature for me.
      However there are some major items lacking which would be most welcome (in rough order of importance):

      1. Save style token highlights between sessions (just like bookmarks)
        1b. Save style tokens in project files as well.
      2. Make clearing style tokens behave the same way as marking style tokens (i.e. per keyword. Currently “remove a style” removes that highlight from all keywords not just the highlighted one. Adding on the other hand is additive)
      3. Make possible to highlight a keyword with the same style across all open documents.
      4. Make style tokens configurable / add more options (I know you can actually combine them, which is good, but not enough)
      5. Add a GUI element to manage keyword / style / file(?) associations.

      I would even be willing to contribute, but I’m not a developer and don’t even know where to start :-)

      1 條回覆 最後回覆 回覆 引用 2
      • greenzestG
        greenzest
        最後由 編輯

        Hello,

        It seems to me that an easy solution to your request would be using the UDL (aka User Defined Language), i too frequently crawl through logs and this is a must.

        Basically, this will let you style (with a tons of options) any keyword in any document with the specified extension (that you can set). Go to menu “language” > “define your language”, “create new”, then you should look for the “keyword” tab. For example, try to input the keyword “error” in the first group, style it in red with the button “styler” and appreciate the result. You can set the extension to associate with your defined language in the Ext. text box (separated by spaces).

        Check this doc for more information.

        Basically, the only feature missing from your list is the n°2, but with the combination of UDL + tokens you should be good.

        ++

        1 條回覆 最後回覆 回覆 引用 0
        • Zoltán KelemenZ
          Zoltán Kelemen
          最後由 編輯

          Thanks for the tip, I’ll consider this.

          However I don’t really have standard expressions to look for (like “Error”) but instead I’m looking for IP addresses, CallIDs etc things that are unique for each set of logs (unique to an event) I may be tracing so I would need to keep the language “editor” open. Which is OK.
          It has a number of already apparent drawbacks to marking already:

          • it seems slower (this may have been due to having a lot of large files open at once, including the one I used to try it and it may have attempted to apply highlighting to all)
          • it can only mark entire “words” not substrings too (because that obviously would not make sense in a language highlighting I understand, but sometimes I may want to track an IP that appears in a sip URI for instance: sip:john@10.20.30.40 etc This is the biggest actual issue with it.
          1 條回覆 最後回覆 回覆 引用 0
          • Cheryl TeschC
            Cheryl Tesch
            最後由 編輯

            Hello Zoltan - did you ever get a response from Notepad++ for these options you mentioned. I found out the hard way of using Style Token in a large text file and then after saving and reopening, 4 hours of work was lost. It is just a great feature but does not make sense why it cannot be saved.

            1 條回覆 最後回覆 回覆 引用 0
            • OtielO
              Otiel
              最後由 編輯

              Would love to see that implemented as well.

              1 條回覆 最後回覆 回覆 引用 0
              • Ananth SA
                Ananth S
                最後由 編輯

                It will really helps, if Notepad++ has this feature.

                1 條回覆 最後回覆 回覆 引用 0
                • cmeriauxC
                  cmeriaux
                  最後由 編輯

                  @Zoltán-Kelemen said:

                  “Make clearing style tokens behave the same way as marking style tokens (i.e. per keyword. Currently “remove a style” removes that highlight from all keywords not just the highlighted one. Adding on the other hand is additive)”

                  You can clear style by style:
                  Search\Unmark All\ Clear 1st style
                  Search\Unmark All\ Clear 2st style
                  …

                  Style tokens uses the options of “find GUI” to work (whole word and match case)

                  1 條回覆 最後回覆 回覆 引用 1
                  • 第一個貼文
                    最後的貼文
                  The Community of users of the Notepad++ text editor.
                  Powered by NodeBB | Contributors