Community
    • 登入

    UDL User Defined Language - keyword inside delimiter

    已排程 已置頂 已鎖定 已移動 Notepad++ & Plugin Development
    5 貼文 2 Posters 2.1k 瀏覽
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • Sayanel LyyantS
      Sayanel Lyyant
      最後由 編輯

      Hi,
      I’ve got a language for which some keyword should be evaluated only when within delimiter, meaning I want to see have :
      x = [keywordx2] // keyword should be recognized
      x = keywordx2 // incorect use of keyword, so it should not be recognized
      –> notice that bold only applies when keyword is within [ ]. Many other things oculd be inside the brackets (other keyword, operator, …)
      How to obtain that in with an UDL? Is it possible?
      Thanks

      Claudia FrankC 1 條回覆 最後回覆 回覆 引用 0
      • Claudia FrankC
        Claudia Frank @Sayanel Lyyant
        最後由 編輯

        @Sayanel-Lyyant

        you already posted the solution - define a delimiter and assign the color you want to it.
        Or did I miss something?

        Cheers
        Claudia

        Sayanel LyyantS 1 條回覆 最後回覆 回覆 引用 0
        • Sayanel LyyantS
          Sayanel Lyyant @Claudia Frank
          最後由 編輯

          @Claudia-Frank
          No it would be too easy : only my keyword should be colored, meaning :
          Normal text is black
          Text in brackets is red
          MyKeyword not inside brackets is black
          MyKeyword inside brackets is blue (and the rest of the text inside the same brackets is red)

          (sorry I can’t give you visual example, as this forum doesn’t allow colored text, or at least I did not find it)

          Claudia FrankC 1 條回覆 最後回覆 回覆 引用 0
          • Claudia FrankC
            Claudia Frank @Sayanel Lyyant
            最後由 編輯

            @Sayanel-Lyyant

            Ok, so if I understood correctly you want something like this

            No, sorry - I don’t think this can be achieved with UDL.
            The problem basically is that you cannot define keywords_encased_by_delimiters only.

            Cheers
            Claudia

            1 條回覆 最後回覆 回覆 引用 0
            • Sayanel LyyantS
              Sayanel Lyyant
              最後由 編輯

              Yes thats it exactly
              So sad… I’ll do without it.
              Maybe it could be an improvement to do to UDL?

              Thanks

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