Folding based on Indent?
-
Hi,
How do I get Notepad++ to fold based on the indent level?
I noticed Python and YAML will fold based on indent level, but they have the side-effect of syntax colouring things incorrectly for the files I’m working on, so I don’t find them usable.
I tried making a new language definition, but couldn’t figure out how to make it fold based on whitespace/indent level like YAML and Python do. The boxes seem to ignore whitespace, and expect to have an “end” delimiter which I guess this doesn’t have.
I even tried looking at YAML and Python sections in the
%AppData%\Roaming\Notepad++\langs.xml
file, but it doesn’t seem to have anything about indent that I could copy.Any help?
Thanks.
-
Hi. I found your post as I was googling for the same thing. I read on Stack Overflow that it can’t be done. It does it for Python and YAML thanks to Scintilla, which is the editor used within Notepad++ and which recognizes those two languages.
http://stackoverflow.com/questions/7246004/configure-notepad-to-use-indentation-based-code-folding
I’m using indentation to describe a complex array in PHP. For my purposes, the Python style works ok. On my computer, the YAML language makes all the text red. I hope one of the two works for you.