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

  • 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??

  • @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 =

    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 =

    Actually, thinking about your problem, using “Folding in comment” instead of “Folding in code” might be better ( 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)
    Then go to the “Folder & Default” and set up Folding In Comment with Open and Close
    (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:

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

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

Log in to reply