diff options
Diffstat (limited to '.vim')
| -rw-r--r-- | .vim/startup/mappings.vim | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/.vim/startup/mappings.vim b/.vim/startup/mappings.vim index 001589a..1eb4a30 100644 --- a/.vim/startup/mappings.vim +++ b/.vim/startup/mappings.vim @@ -60,6 +60,15 @@ xnoremap <expr> j (v:count == 0 ? 'gj' : 'j') " nnoremap o o<Esc> " nnoremap O O<Esc> +" Thanks https://github.com/drzel/vim-split-line +nnoremap K :keep s/\s*\%#\s*/\r/e <bar> noh<CR> + +" Better resizing when navigating splits +nnoremap <C-L> <C-W>l<C-W>= +nnoremap <C-H> <C-W>h<C-W>= +nnoremap <C-J> <C-W>j<C-W>= +nnoremap <C-K> <C-W>k<C-W>= + " Ctrl-Backspace deletes the previous word in insert mode. inoremap <C-h> <C-w> cnoremap <C-h> <C-w> @@ -73,7 +82,7 @@ nnoremap <F1> <ESC>:mksession! .vim-session<CR> nnoremap <F8> :<C-u>call gitblame#echo()<CR> " Open lazygit in a new tab with = -nnoremap <silent> = :tab ter ++close lazygit<CR> +nnoremap <silent> \| :tab ter ++close lazygit<CR> " Tab navigtion execute "set <M-o>=\eo" @@ -85,6 +94,16 @@ nnoremap <M-p> gt inoremap <M-p> <C-O>gt tnoremap <M-p> <C-W>gt +" Arrows = bad +inoremap <Up> <Nop> +inoremap <Down> <Nop> +inoremap <Left> <Nop> +inoremap <Right> <Nop> +nnoremap <Up> <Nop> +nnoremap <Down> <Nop> +nnoremap <Left> <Nop> +nnoremap <Right> <Nop> + " Cyrillic (Bulgarian yawerty layout) support ca в w ca ва wa |
