Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Notepad++ fold all tags by default? [closed]

I have a huge XML code that I keep adding to. It has about 13.465 lines of code, and a LOT of tags. To keep everything organised (Because, the code is almost unreadable), I decided I could just fold all my tags and comment as to what they are.

Is there any way to achieve this every time I open Notepad++ without having to use the "Fold all" option?? I'm using notepad++ windows XP, and XML.

like image 395
Bugster Avatar asked May 05 '12 13:05

Bugster


1 Answers

There is a way to define a user-defined language for you to tell Notepad++ to fold tabs by default.

This is an unnecessary procedure however, since you can very quickly fold tabs without having to specially create a user-defined language each time you have a large, clunky xml file.

Use the shortcuts Alt+4 and then Alt+3...... Alt+1 to fold your xml tags in a sequence, depending on the depth you want to fold to. To expand only a particular level once again, just Ctrl-click the + sign next to the tag you want to expand. This is the best way to view large blocks of any code in Notepad++, and avoids having to spend a lot of time configuring a special style for each language. Once your tabs are folded to the desired depth, you can insert comments where required. Few steps, easy results.

like image 157
prrao Avatar answered Oct 21 '22 20:10

prrao