Add all other areas

Is there a trick to reset all other functions, but not where my cursor is?

+3
source share
1 answer

You can define a normal mode map as follows:

:nnoremap <Leader>f zMzO

zMcloses all the folds in the current file (which will add the current function), then zOrecursively opens the fold under the cursor (which expands the current function).

It is assumed that you :set foldmethod=syntax; it will not necessarily work with other types of folding.

+3
source

Source: https://habr.com/ru/post/1756053/


All Articles