Community
    • Login

    Folding in HTML?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 312 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.
    • Name PrivateN
      Name Private
      last edited by

      Hi everyone,

      so I was able to figure out, that I can create my own keywords in the “UserDefinedLanguage”.

      However,
      by adding anything in the “Folding in comment style:” window,
      it allows me to fold comments.
      But it folds to the very end of my code/text?

      Also, is it possible to add this folding function into the already existing HTML language?

      Thanks in advance

      PeterJonesP 1 Reply Last reply Reply Quote 0
      • PeterJonesP
        PeterJones @Name Private
        last edited by

        @Name-Private ,

        But it folds to the very end of my code/text?

        For UDL folding in comment, it works just like described at https://ivan-radic.github.io/udl-documentation/folding-in-comment/ , which you can get to from the link in the UDL dialog:

        If I make a quick UDL that just defines comments
        like HTML comments:
        
        <!-- this is a comment -->
        
        Then I can use Folding in comment style, like
        described at https://ivan-radic.github.io/udl-documentation/folding-in-comment/
        
        <!-- openFold -->
        
        stuff here
        
        <!-- middleFold -->
        
        blah
        
        <!-- closeFold -->
        
        outside of folding-in-comment
        

        which if that UDL is active will show up as:
        469ad9e8-59dd-4b97-8731-c80d7520af18-image.png
        … and then when folded:
        489627f2-1473-44bf-addd-4603c6faf1f2-image.png

        Note that the folding begins and ends with the keywords defined.

        Also, is it possible to add this folding function into the already existing HTML language?

        You cannot combine folding from a UDL and folding in a builtin syntax highlighter like HTML, sorry. Only one lexer – either UDL or a builtin – can be active at a time.

        1 Reply Last reply Reply Quote 2
        • Name PrivateN
          Name Private
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors