Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Newline as delimiter in a UDL

    Help wanted · · · – – – · · ·
    newline udl2
    4
    10
    2174
    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.
    • Unc3nZureD
      Unc3nZureD last edited by

      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!

      Meta Chuh Eko palypse 2 Replies Last reply Reply Quote 0
      • Meta Chuh
        Meta Chuh @Unc3nZureD last edited by Meta Chuh

        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
        • Eko palypse
          Eko palypse @Unc3nZureD last edited by

          @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
          • Meta Chuh
            Meta Chuh last edited by

            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
            • Eko palypse
              Eko palypse last edited by

              @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.

              Meta Chuh 1 Reply Last reply Reply Quote 2
              • Meta Chuh
                Meta Chuh @Eko palypse last edited by Meta Chuh

                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
                • Eko palypse
                  Eko palypse last edited by

                  @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
                  • Unc3nZureD
                    Unc3nZureD last edited by

                    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
                    • PeterJones
                      PeterJones last edited by

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

                      Meta Chuh 1 Reply Last reply Reply Quote 1
                      • Meta Chuh
                        Meta Chuh @PeterJones last edited by Meta Chuh

                        @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
                        • Referenced by  Andre Bergmann Andre Bergmann 
                        • First post
                          Last post
                        Copyright © 2014 NodeBB Forums | Contributors