3 ms·
I use space for toggling folding: " space toggles the fold state under the cursor. nnoremap <silent><space> :exe 'normal! za'.(foldlevel('.')?'':'l')<cr>
by phaedrix 14y ago
I use space for toggling folding:
" space toggles the fold state under the cursor.
nnoremap <silent><space> :exe 'normal! za'.(foldlevel('.')?'':'l')<cr>
" <leader>space expands with zO
map <leader><space> zO
- q_revert 14y agosame here, but use nnoremap <Space> za vnoremap <Space> za also, for folding in general I'd recommend using set foldmethod=marker which has the benefit of making folds more 'transparent' in your code, and also persistent across vim sessions