mirror of
https://github.com/pratiktri/dotfiles.git
synced 2026-02-04 08:41:43 +05:30
refactor(vim): Moved keymap from vimrc -> key_maps.vim
- New: Center cursor on `G`
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user