Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

My question is pretty straight-forward, is there a way in Notepad++ to expand and collapse blocks with keyboard shortcut? I already know about the alt+0 and alt+shift+0 to expand / collapse all blocks but i want to achieve this for a single block.

The behavior i want to reproduce is when you click the little +/- symbol near a code or xml block but with keyboard only.

share|improve this question
up vote 20 down vote accepted

Ctrl+Alt+F collapse current level and Ctrl+Alt+Shift+F expand it.

share|improve this answer
The shortcut alt+0 for fold all and alt+shift+0 for unfold all.… – MohD Jun 7 '15 at 5:32

In short:
Alt+0 folds (collapses) all Blocks
Alt+1 folds all Level 1
Alt+2 folds all Level 2
Alt+x etc.

Alt+Shift+0 Unfolds all
Alt+Shift+1 Unfolds Level 1
Alt+Shift+2 Unfolds Level 2
Alt+Shift+3 Unfolds Level 3
Alt+Shift+x etc.

And yes, bzlm, in the ShortCut Mapper, in the Menu 'Settings', the command Alt+3 is mapped to a Command named 3. This one is below the command Collapse Current Level, so the meaning is Collapse Level 3 or Fold all Level 3 Blocks

share|improve this answer
Please read the question again carefully. Your answer does not answer the original question. None of your shortcuts will expand/collapse a single block which is what the question asked for. This answer may be a comment on another answer, but it doesn't answer the question. – DavidPostill Nov 17 '15 at 15:21

Try using ALT-3 and for element level condense and collapse.

This will condense all siblings of the root node one by one.

share|improve this answer
I don't think your command does what OP described. However, it seems to do something. Care to explain what and how? – Konrad Viltersten Dec 5 '14 at 15:11
Please care. In my Notepad++ alt-3 is confusingly mapped to a command named 3. – bzlm Sep 25 '15 at 8:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .