Community

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

    Fold by Indent

    Help wanted · · · – – – · · ·
    2
    4
    643
    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.
    • David Brigden
      David Brigden last edited by

      As I’ve worked with N++ and languages, I’ve noticed that it will automatically fold( and nest) some of the languages based on the indention.

      This feature is wonderful and I would like to use it when I have a command that I continue on multiple lines.

      I write in a non-standard language. I already use UDL and love it. Is this possible using UDL? is there a plug-in that would do this?

      1 Reply Last reply Reply Quote 0
      • PeterJones
        PeterJones last edited by

        @David-Brigden said:

        Is this possible using UDL? is there a plug-in that would do this?

        As far as I know, UDL will not fold/nest based on indents, only on character sequences. Though if someone can prove me wrong, great!

        It is possible to write a plugin to do that – because it’s theoretically possible to write your own lexer plugin. But I don’t know of any that already exist.

        1 Reply Last reply Reply Quote 2
        • David Brigden
          David Brigden last edited by

          That’s what I figured. Guess I just leave those long lines alone manually wrap inside a region

          1 Reply Last reply Reply Quote 0
          • PeterJones
            PeterJones last edited by

            @David-Brigden said:

            Guess I just leave those long lines alone manually wrap inside a region

            Maybe I misunderstood. Fold/nest (which I was talking about) implies the hiding of lines from a block structure, such as a c-function, like

            ⊟ int blah(args) {
                int a = 1;
                int b = 2;
              }
            ⊟ double yo(args) {
                double a = 1;
                double b = 2;
              }
            

            being collapsed down to

            ⊞ int blah(args) {
            ⊞ double yo(args) {
            

            Whereas “long lines … wrap” is a completely different setting (View > Word Wrap or equivalent toolbar icon), and just converts

            13    Pretend this line... is very, very long
            14    And another line
            

            into

            13    Pretend this line...
                  is very, very long 
                  (but now it is wrapped)
            14    And another line
            
            1 Reply Last reply Reply Quote 3
            • First post
              Last post
            Copyright © 2014 NodeBB Forums | Contributors