Reputation: 3852
What is the key binding for folding and expanding code blocks in ideavim plugin ?
(za works in vrapper for eclipse , but not in ideavim )
Upvotes: 24
Views: 7548
Reputation: 141
Adding these lines to your ~/.ideavimrc allows the zO and zC commands, which recursively open and close the folds under the cursor:
nnoremap zC :action CollapseRegionRecursively<CR>
nnoremap zO :action ExpandRegionRecursively<CR>
I find these to be super-helpful in vim, and was missing them when using PyCharm with IdeaVim. (HT: https://github.com/JetBrains/ideavim/pull/97 )
Upvotes: 11
Reputation: 3852
source : ideavim help: fold
zo Open one fold under the cursor. When a count is given, that many folds deep will be opened. In Visual mode one level of folds is opened for all lines in the selected area.
zc Close one fold under the cursor. When a count is given, that many folds deep are closed. In Visual mode one level of folds is closed for all lines in the selected area. 'foldenable' will be set.
zM Close all folds: set 'foldlevel' to 0. 'foldenable' will be set.
zR Open all folds. This sets 'foldlevel' to highest fold level.
Upvotes: 51