• Login
Community
  • Login

Newline as delimiter in a UDL

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
newlineudl
10 Posts 4 Posters 4.0k 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.
  • U
    Unc3nZureD
    last edited by Jan 17, 2019, 1:25 PM

    Is it possible to set a newline as a delimiter in a UDL? Is there any special symbol for that?

    For example in my case, I’d like to mark the line which starts with #, ends with a newline. It’s possible as a comment, but it isn’t a comment, so I’d like to differentiate it… The best I can think of is to mark is with a delimiter starts with # and ends with newline, but I can’t see any special note for newline char.

    Or for another example, I’d like to color the “labels” in a C-style language. It starts with a colon and ends with a newline.

    Is it possible in any way?

    Thank you!

    M E 2 Replies Last reply Jan 17, 2019, 2:17 PM Reply Quote 0
    • M
      Meta Chuh moderator @Unc3nZureD
      last edited by Meta Chuh Jan 17, 2019, 2:20 PM Jan 17, 2019, 2:17 PM

      welcome to the notepad++ community @Unc3nZureD

      unfortunately, as you have found out already, it is only possible to use multiple of such characters or strings as a comment starting delimiter, that ends at eol, like seen at the screenshot below.

      Imgur

      one thing you could play around with, to see if you can use it for your needs, is to set prefix/suffix operators (operators 1 as seen at the screenshot below).
      this will not mark until eol, but at least you can have , and ; and #, without a space separator, as prefixes/suffixes to your standard syntax.

      Imgur

      1 Reply Last reply Reply Quote 2
      • E
        Eko palypse @Unc3nZureD
        last edited by Jan 17, 2019, 3:28 PM

        @Unc3nZureD

        I assume you are looking for ((EOL))
        and note, this is the only special thing you can specify.

        1 Reply Last reply Reply Quote 2
        • M
          Meta Chuh moderator
          last edited by Jan 17, 2019, 6:25 PM

          i’ve played around with @Eko-palypse ((EOL)) suggestion (thanks, good idea), to create a distinguished comment line style in the comment block style, and it might suit you too, if you don’t mind, that all comment blocks have the same color as a # line.

          one caveat would be that you can not use a , colon, as it will trigger in all lines.
          see settings and example at the screenshot below.

          Imgur

          1 Reply Last reply Reply Quote 2
          • E
            Eko palypse
            last edited by Jan 17, 2019, 6:31 PM

            @Meta-Chuh said:

            if you don’t mind, that all comment blocks have the same color as a # line.

            by using delimiter instead of comment you can divide the two - just in case you want
            to have different colors.

            M 1 Reply Last reply Jan 17, 2019, 6:46 PM Reply Quote 2
            • M
              Meta Chuh moderator @Eko palypse
              last edited by Meta Chuh Jan 17, 2019, 6:47 PM Jan 17, 2019, 6:46 PM

              thanks @Eko-palypse, and sorry, i didn’t think about this, as i somehow got stuck with the word “comment” in my head 😉
              i’ve tried it, and it also works like a charm. 👍

              Imgur

              ps: i think those hijacked threads seem to be very productive lately ;-)

              1 Reply Last reply Reply Quote 2
              • E
                Eko palypse
                last edited by Jan 17, 2019, 6:48 PM

                @Meta-Chuh said:

                and sorry

                ?? why do you excuse if you help someone - there is NO need to excuse here?? :-D

                1 Reply Last reply Reply Quote 1
                • U
                  Unc3nZureD
                  last edited by Jan 17, 2019, 11:05 PM

                  Thanks guys, this ((EOL)) Sounds great, tomorrow I’ll try it if I can tailor it for my needs :)

                  By the way, is it documented anywhere? I couldn’t find it.

                  1 Reply Last reply Reply Quote 2
                  • P
                    PeterJones
                    last edited by Jan 17, 2019, 11:23 PM

                    It’s in the section of the UDL documentation on comments: https://ivan-radic.github.io/udl-documentation/comments/

                    M 1 Reply Last reply Jan 18, 2019, 10:30 PM Reply Quote 1
                    • M
                      Meta Chuh moderator @PeterJones
                      last edited by Meta Chuh Jan 18, 2019, 11:26 PM Jan 18, 2019, 10:30 PM

                      @PeterJones

                      thanks for your link, it’s a reminder of paying a lot of gratitudes to loreia.

                      i’ve just revisited this old thread answered by @Claudia-Frank and realized how fast an author, of an ingenious work like this one, can almost be forgotten, once it is taken as granted as the air that we breathe.

                      … and yet again, i have to repeat that i miss claudia and scott … not that i just miss and lack their knowledge and passion to research,
                      (many of the +2 year core regulars have already been able to achieve or surpass the same level)
                      but i just miss having them around.

                      readers note:
                      yes we all do have a life outside notepad++, but we use it, love it (sub note: love|hate as in any relationships ;-) ), believe in it due to it’s almost unprecedented activity in the 16 years of it’s existence, and we just enjoy giving something in return, by helping people that can’t spend as much time on what you can do with notepad++, and most important: share how to do it.
                      helping out is also a little gesture to appreciate the help we received when we started out as newbies.

                      1 Reply Last reply Reply Quote 3
                      • A Andre Bergmann referenced this topic on Jan 24, 2022, 2:57 PM
                      1 out of 10
                      • First post
                        1/10
                        Last post
                      The Community of users of the Notepad++ text editor.
                      Powered by NodeBB | Contributors