Text Blocks without end

  • Hi,

    I defined a language and want to use text blocks in notepad++. But normaly you have to define an end, like:


    But in the language I want to use is no end sign. So can I define the end as a line before a new start line? Like:

    $ a comment
    last line
    last line

    Finally I want to end the blocks in the “last line”. Normally there is a misc. text an no keyword or sign.


  • Hello @railien and All,

    Why not this following road map ?

    • Open a new file ( Ctrl + N )

    • Paste the text, below :

    *FIRST block
      This is
      a text
      of a group
      of lines
    *SECOND block
      bla bla
      ... ...
      ... ...
      ... ...
      ... ...
    *THIRD block
    *LAST block
    Here is
    the final
    • Select the Language > User-Defined for this new file

    • Then, open the User Defined Language > Define your language... dialog

    • Select the Folder & Default tab

    • In Folding in code1 style:, just type in a * symbol in the Middle box

    Voila ;-))

    Best Regards,


  • Hello guy038,

    thanks for your answer. I’ve already tried this. In that case, if I fold the first block, everything ist folded. But I want the second block to be unfolded.

    Maybe the question was a bit different. I want an end of the folding, but one line bevor the next start line. The start line (second block) should not be linked to the first block. This what I get when I do so as you proposed.

    Best Regards

  • @Railien said in Text Blocks without end:

    if I fold the first block, everything ist folded.

    Then you did not follow @guy038’s directions. Notice that he only defined the middle folding, nothing else.

    Using your original data, I followed his instructions, and got exactly the behavior you described. See my animation below:

  • Thank you PeterJones,

    that’s it.
    I’ve even tried that, but somehow did’t see the functionality.

Log in to reply