Question

I am majoring in financial studies and write my R code primarily in Notepad++.

I also use Notepad++ to write my thoughts and plans before moving the final version to Latex.

What I wanted to do is to use Notepad++ to be able to fold wherever I want, on whatever language I write, whether it is Python, R, etc., even plain txt too.

vim/emacs may or may not have that feature already, but I don't think I have the willingness to study one of them since the learning curve is steep

I hope that there's a specific way to do the custom folding so as not to interfere with the native code-folding feature of Notepad++ (ex: like how # trigger comment in R, or like in Python).

Was it helpful?

Solution

I would definitely go with User-Defined styles for the text files.

For Ruby, since it is an already defined language, you can either

But, that would be for a specific language so you would have to select the style for each language (so doesn't meet your requirement "for any language").

Probably a solution would be a macro or a Python script modifying your text (for example by using the hide function of Notepad++).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top