refactor(vim): Moved keymap from vimrc -> key_maps.vim

- New: Center cursor on `G`
This commit is contained in:
Pratik Tripathy
2025-09-01 12:22:29 +05:30
parent b7f5eec5ea
commit 85040e131d
2 changed files with 4 additions and 9 deletions

View File

@@ -18,6 +18,9 @@ inoremap <Right> <ESC>:echoe "Use l"<CR>
inoremap <Up> <ESC>:echoe "Use k"<CR> inoremap <Up> <ESC>:echoe "Use k"<CR>
inoremap <Down> <ESC>:echoe "Use j"<CR> inoremap <Down> <ESC>:echoe "Use j"<CR>
" Ctrl+Backspace to add an undo-point and delete last word
imap <C-BS> <C-g>u<C-w>
" Unbind some useless/annoying default key bindings. " Unbind some useless/annoying default key bindings.
nmap Q <Nop> nmap Q <Nop>
@@ -32,6 +35,7 @@ nnoremap <C-i> <C-i>zz
nnoremap ]s ]szz nnoremap ]s ]szz
nnoremap n nzzzv nnoremap n nzzzv
nnoremap N Nzzzv nnoremap N Nzzzv
nnoremap G Gzz
" Move visually selected lines around with J & K " Move visually selected lines around with J & K
vnoremap J :m '>+1<CR>gv=gv vnoremap J :m '>+1<CR>gv=gv

View File

@@ -31,12 +31,3 @@ autocmd! bufwritepost $VIMRC source %
" Save inside vim config directory " Save inside vim config directory
set undodir=$VIMDIR/undo// set undodir=$VIMDIR/undo//
" Ctrl+Backspace to add an undo-point and delete last word
" It's here cause ideavim messes it up
imap <C-BS> <C-g>u<C-w>
" Map nerdtree to <Leader>e
" Changes the pwd and opens the VCS root
" Placed here because ideavim doesn't understand :tcd
nnoremap <leader>e :tcd %:h<CR> :NERDTreeToggleVCS<CR>