6

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

bluish
  • 26,356
  • 27
  • 122
  • 180
Firhat Nawfan H.
  • 187
  • 2
  • 12
  • 2
    Not a complete solution, but a possible workaround: http://stackoverflow.com/questions/3761206/notepad-user-defined-regions-with-folding – DaV Oct 15 '13 at 12:03
  • @Firhat : What kind of elements would you use to define the beginning and end of the blocks you want to fold? – Jean-Francois T. Mar 14 '14 at 03:29
  • 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 folding – Firhat Nawfan H. Mar 15 '14 at 06:03

1 Answers1

3

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

Community
  • 1
  • 1
Jean-Francois T.
  • 11,549
  • 7
  • 68
  • 107