5
votes

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).

1
Not a complete solution, but a possible workaround: stackoverflow.com/questions/3761206/…DaV
@Firhat : What kind of elements would you use to define the beginning and end of the blocks you want to fold?Jean-Francois T.
the way i want it, the identifier should be is a customizable so i can make a #, or $ or a tab or a // or a vertical space to trigger the foldingFirhat Nawfan H.

1 Answers

2
votes

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++).