Community
    • 登入

    User Defined Language: Comment & Number vs. Keywords Lists

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

      I found a NPP UDL someone else had developed back in 2012 for IBM Cognos TM1. I have since updated it with new keywords to cover the new functions among other enhancements. Two questions:

      1. Is there a common NPP community where I can upload the definition for other folks?
      2. Back ground: TM1 uses # as the comment notation character. There is a third-party add-on tool named QUBEdocs which allows for automation of model documentation. This product takes advantage of the comment character (#) by allowing tags such as #LASTCHANGE which can be entered into the code and then are picked up by QUBEdocs and placed into the HTML documentation it generates.
        Here is the challenge and question: I have identified # as the Open Comment line style and place the QUBEdocs tags in a Keywords Lists group. However, all lines which start with # are styled the same and the QUBEdocs keywords are not styled according to the assigned definition. This leads me to believe that the comment is processed before the keywords. How can I change this language definition so the QUBEdocs tags are styled separately?
      Claudia FrankC 1 條回覆 最後回覆 回覆 引用 0
      • Claudia FrankC
        Claudia Frank @Christopher Redmond
        最後由 Claudia Frank 編輯

        @Christopher-Redmond

        I don’t know TM1 but what you could try is to use # as a delimiter and
        allow nesting of your keywords.

        Cheers
        Claudia

        1 條回覆 最後回覆 回覆 引用 0
        • Jim DaileyJ
          Jim Dailey
          最後由 編輯

          If there aren’t many of the #keywords, you can use the delimiters on the Operators & Delimiters tab.

          Define the #keywords from longest to shortest and choose whatever style(s) you want for each:

          Delimiter 1: Open = “#LASTCHANGE”, Close = “((EOL))”
          Delimiter 2: Open = “#OTHER”, Close = “((EOL))”
          …
          Delimiter 8: Open = “#”, Close = “((EOL))”

          1 條回覆 最後回覆 回覆 引用 1
          • Jim DaileyJ
            Jim Dailey
            最後由 Jim Dailey 編輯

            @Christopher-Redmond

            Actually, I think you can define several #keywords in one delimiter style (separate them with spaces):

            Open = “#LASTCHANGE #OTHER #ANDMORE”
            Close = “((EOL)) ((EOL)) ((EOL))”

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