Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm familiar with Notepad++'s code collapse for certain programming languages but recently I've been working with a plain text file that uses with Wiki syntax. For example:


into (when I collapse Heading1):


I want to be able to collapse these headings and all their contents down at different levels, much like how Notepad++ can collapse tags in HTML, hiding all other tags inside it. I think that's as clear as I explain it any suggestions?

share|improve this question
from your example, it looks like Heading1 and Heading1.1 are at the same level (with ==) while Heading2 and Heading3 are at another level (with ===) – Bolu Apr 5 '11 at 15:31
Yeah, basically I want it to collapse until next heading with same level. – meiryo Apr 5 '11 at 15:37

This can be achieved in SynWrite editor. It has complex user-definable lexers (editor is built-in) in which you can create rules such as:

  • "from = to next ="

  • "from == to next =="

I won't describe how to create lexers for wiki syntax, it's not simple...

share|improve this answer

In Notepad++ it is possible to create a new User Defined Language. You can do so by selecting

View->User Define Dialog

Choose "Folder & Default" tab. This tab control the style of the default text (text that has no special attributes or meaning) and the keywords that control the folding. A keyword in the Folder Open group will trigger a new Fold group that can be expanded and collapsed. A keyword in the Folder Close group will close any opened group. This explanation (and more..) is available at npp-community documentation

share|improve this answer
The Folder collapsing syntax in User-Defined Language is rather primitive and works by identifying particular strings for the open and close. I doubt it can actually count the number of "=". – Gnubie Feb 23 '12 at 13:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.