Community
    • Login

    UDL trigger modifiers

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 253 Views
    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.
    • gibberishbcG
      gibberishbc
      last edited by gibberishbc

      I defined my own UserDefLang a long time ago (improving on the WinBatch UDL) and am coming back to it after a couple of years, trying to identify some problems with code folding.

      I notice that some of the trigger words have a ^ (caret) after them. For example, subroutines in WinBatch begin with a [ :label ] and end with the word [ Return ]. In fact, the thing that indicates a subroutine is that the first word on that line starts with a [ : ] (colon). So, all WinBatch subroutines look like this -

      :Subname
      	some code
      	lotsa code
      	goes here
      Return
      

      In the UDL editor, I noticed that these triggers look like this:

      Open:
      [:^                ]
      Middle:
      [                  ]
      Close:
      [Return^           ]
      

      I believe the caret indicates that the trigger word must be the first word on the line. Am I correct? Can there be white space before the trigger keyword?

      Where can I find documentation about this? (And I wonder if there are other modifiers that can be used in defining trigger words?)

      Notepad++ v8.4.2 (32-bit)
      Build time : May 29 2022 - 16:45:17
      Path : C:\Program Files (x86)\Notepad++\notepad++.exe
      Command Line : $COMMAND_LINE_PLACEHOLDER$
      Admin mode : ON
      Local Conf mode : OFF
      Cloud Config : OFF
      OS Name : Windows 10 Enterprise (64-bit)
      OS Version : 1903
      OS Build : 18362.239
      Current ANSI codepage : 1252
      Plugins :
      ComparePlugin (2.0.1)
      EmmetNPP (1.0.2)
      mimeTools (2.8)
      NppConverter (4.4)
      NppExport (0.4)
      NppFTP (0.29.7)
      NppQCP (2)
      PythonScript (2)

      EkopalypseE 1 Reply Last reply Reply Quote 0
      • EkopalypseE
        Ekopalypse @gibberishbc
        last edited by

        @gibberishbc

        the official documentation is here and no, a ^ does not mean it has to be the beginning of a line. If you think this has to do with regex, then no, UDL doesn’t support regex yet.

        The ultimate truth is in the source.

        1 Reply Last reply Reply Quote 3
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors