Page 1 of 1
Code folding in text files
Posted: 08.07.2022 20:07
by cudatextforum
Is it possible to have code folding in simple text files? I would like to define some character sequences at the start of a line, like "~~" for folding start, and "**" for folding end. And then fold and unfold this block with a command or a mouse click in the code folding column.
Posted: 09.07.2022 07:18
by main Alexey
yes, you can create lexer with any folding rules. see Lexer Tutorials:
https://github.com/Alexey-T/CudaText/tr ... /tutorials
>And then fold and unfold this block with a command or a mouse click in the code folding column.
yes, you can use Command Palette items for this:
- fold block at current line
- unfold block at current line
- toggle block at current line