1

to jump in vim, I use

 nnoremap <c-j> /<++><cr>c/+>/e<cr>

but, when the <++> are in a close fold, the <c-j> delete all fold, for this I change to

 nnoremap <c-j> /<++><cr>zOc/+>/e<cr>

but, when the <++> are not are in a fold I get

 E490: No fold found

1 Answer 1

2

Use zv instead of zO. That will work without an error message whether in a fold or not.

You must log in to answer this question.

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