• Login
Community
  • Login

Wildcards in UDL

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
udl
4 Posts 2 Posters 1.3k 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.
  • F
    F2 Andy
    last edited by Jul 13, 2020, 7:55 AM

    Is there a wildcard in UDL? I have found posts from about four years ago saying there is not, but I am hoping the situation may have changed. I read the documentation, and there looks to be a special code in double brackets. The two example I have seen of it in use are ((EOL)) and (( \ ??/)). However, I could not find any more than that. I had a quick play around, and failed to get anything to work.

    More specifically, I want to have keywords identified only if they are at the start of a line, allowing for indenting (for Pug templates).

    E 1 Reply Last reply Jul 13, 2020, 11:54 AM Reply Quote 0
    • E
      Ekopalypse @F2 Andy
      last edited by Jul 13, 2020, 11:54 AM

      @F2-Andy said in Wildcards in UDL:

      Is there a wildcard in UDL?

      No, there is a prefix mode, like a word starting with … gets colored, but that is it.

      More specifically, I want to have keywords identified only if they are at the start of a line, allowing for indenting

      So you just want to color those words to get yourself triggered to indent these lines? If you can/want to install python script we can create a script doing this more automatically. If you are interested, of course.

      1 Reply Last reply Reply Quote 1
      • F
        F2 Andy
        last edited by Jul 15, 2020, 7:32 AM

        To add a bit more background, Pug is a template for HTML pages, so most of the text is prose. Keywords are characterised by being at the start of a line. So “if” at the start of the line is a Pug command, and in the middle of the line it is just plain text. I guess that is quite different to a programming language, where “if” always means the same thing.

        I would be interested in looking at a Python script. Is there some documentation somewhere, so I could at least get some idea of what is involved?

        E 1 Reply Last reply Jul 15, 2020, 12:21 PM Reply Quote 0
        • E
          Ekopalypse @F2 Andy
          last edited by Jul 15, 2020, 12:21 PM

          @F2-Andy

          The actual documentation is on github a source .
          The documentation found on sourceforge is, afaik, outdated.

          For coloring, I posted a possible solution here .

          If there is anything I can do, let me know.

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