commit c7e61b90fff9aa66b95f714ec9d994463012bf25
parent 44f4f79631701ad43346ffa29d4fb8ba66e27150
Author: Alex Balgavy <alex@balgavy.eu>
Date: Wed, 6 Oct 2021 19:40:13 +0200
vim: some maps
Diffstat:
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/vim/vimrc b/vim/vimrc
@@ -893,10 +893,6 @@ nnoremap gV `[v`]
" Save in insert mode
inoremap <C-Z> <C-o>:w<CR>
-" Set the foldlevel
-nnoremap zn :set foldlevel=
-nnoremap zs :exe "set foldlevel=".foldlevel(line('.'))<CR>
-
" Config edit mappings
" Why :drop? It uses the file if it's already open.
" Also have to map c-c to no-op first, otherwise doesn't work
@@ -1033,6 +1029,11 @@ nnoremap <leader>z{ :setlocal foldmethod=marker<CR>
nnoremap <leader>zs :setlocal foldmethod=syntax<CR>
nnoremap <leader>ze :setlocal foldmethod=expr<CR>
nnoremap <leader>zd :setlocal foldmethod=diff<CR>
+
+" Set the foldlevel
+nnoremap <leader>zn :set foldlevel=
+nnoremap <leader>zt :exe "set foldlevel=".foldlevel(line('.'))<CR>
+
" Autocommands {{{1
if has('autocmd')
augroup vimrc_sets