Community
    • Login

    UDL trigger modifiers

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 530 Views 1 Watching
    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 Offline
      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 Offline
        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

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors