diff --git a/vim/.vimrc b/vim/.vimrc index 773dace..bb0ae18 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -207,11 +207,14 @@ nmap ww :call mkdir(strftime("diary/%Y/%m"), "p", 0755) \ "" Keymappings "" -" Other key mappings -map :NERDTreeToggle -nmap N :NERDTreeFocus " Removes trailing whitespaces nnoremap s :keeppattern %s/\s\+$// +nnoremap :m .+1== +nnoremap :m .-2== +inoremap :m .+1==gi +inoremap :m .-2==gi +vnoremap :m '>+1gv=gv +vnoremap :m '<-2gv=gv " Quickfix and location lists key mappings nmap cf :cfirst @@ -227,6 +230,14 @@ nmap lc :lclose autocmd BufNewFile,BufRead *.tmpl set syntax=gohtmltmpl +" Easier to exit terminal insert mode with Esc +tnoremap + + +" Nerdtree mappings +map :NERDTreeToggle +nmap N :NERDTreeFocus + " Coc mappings nmap gd (coc-definition) nmap gy (coc-type-definition) @@ -296,6 +307,3 @@ if has("autocmd") endif nmap w :w - -" Easier to exit terminal insert mode with Esc -tnoremap