Community
    • Login

    HTML like plus(+) and minus(-) box

    Scheduled Pinned Locked Moved General Discussion
    3 Posts 2 Posters 1.5k Views 2 Watching
    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.
    • Madan Mohan MurmuM Offline
      Madan Mohan Murmu
      last edited by

      Is there any way to get those HTML like plus(+) and minus(-) box next to numbered lines without having to use HTML in first place so that I can club some comments under one Plus(+) box??

      PeterJonesP 1 Reply Last reply Reply Quote 0
      • PeterJonesP Offline
        PeterJones @Madan Mohan Murmu
        last edited by

        @Madan-Mohan-Murmu ,

        Those + and - boxes are the “code folding” feature. Many of the syntax highlighters have them.

        You have to have a syntax highlighter active for your current file for the cold folding to be enabled.

        If your file format does not match one of the built-in syntax highlighters, you can define one using the User Defined Language feature (overview in official online user manual = https://npp-user-manual.org/docs/user-defined-language-system/).

        For UDL-based code-folding, you have to define Open and Close keywords (similar to HTML requiring a <p> to start a paragraph and </p> to end one, the UDL code-folding feature requires something to indicate both the start and the end of the code-folding region). (the docs linked in the User Defined Language dialog have a page on code-folding = https://ivan-radic.github.io/udl-documentation/folding-in-code/)

        Actually, thinking about your problem, using “Folding in comment” instead of “Folding in code” might be better (https://ivan-radic.github.io/udl-documentation/folding-in-comment/). To get that to work, first go to the “Comment & Number” tab of the UDL dialog, and setup your comment (my example will use line comments starting with # formatted green)
        56ffd4b2-00ca-45b2-b695-e35fc33510c4-image.png
        Then go to the “Folder & Default” and set up Folding In Comment with Open and Close
        d65847d5-f37e-4899-9051-0f95b533c159-image.png
        (I made the style darker green and italic for the Open/Close keywords

        If you wanted to try with folding-in-code instead, here’s an example:
        ca628c7d-3f3f-435e-8826-c2a13d1ed74b-image.png
        16d68283-0d6d-44f2-a69b-e372d823d937-image.png

        I think the Folding in Comment is more likely to be what you want, but it’s up to you.

        1 Reply Last reply Reply Quote 2
        • Madan Mohan MurmuM Offline
          Madan Mohan Murmu
          last edited by

          That’s Exactly I wanted Thank you man!
          “Folding In Comment” It is this thing I wanted.😀

          1 Reply Last reply Reply Quote 3

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors