49

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.

43

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

41

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

and
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

  • 2
    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
-1

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

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

  • 1
    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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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