diff --git a/init.vim b/init.vim index 4bd932a..a9d9496 100644 --- a/init.vim +++ b/init.vim @@ -316,22 +316,55 @@ nnoremap cs :let @/="" nnoremap : :setlocal number: nnoremap rc :so $MYVIMRC nnoremap nh (&hls && v:hlsearch ? ':nohls' : ':set hls')."\n" +nnoremap sl :set invlist +nnoremap aa A +nnoremap a2 A +nnoremap ab AB +nnoremap co :!clear; +nnoremap ;; A; +nnoremap ;j jA; +nnoremap ,, A, +nnoremap ,j jA, " Focus on current fold, close the rest nnoremap zz zMzvzt +" replace current word with last yanked/deleted text +nnoremap rw "_diwP +" replace current word with last yanked text +nnoremap ry diw"0P +" quick grep of visual selection +vnoremap gr y:grep! -R " . " open quickfix window of TODOs " FIXME i want fixme!!! nnoremap td :grep -RE '(TODO\\|FIXME)' .:botright cwindow:echo len(getqflist()) 'TODOs' +" devdocs mapping +nnoremap dd :DD +" write and delete current buffer +nnoremap bx :w\|bd " sync highlighting from start nnoremap ss :syntax sync fromstart "}}} +" terminal{{{ +" if has('terminal') +" tnoremap +" endif +"}}} +" windows{{{ + nnoremap ww :resize:vertical resize + +" }}} " git mappings {{{ +nnoremap gD :!clear; echo 'git diff'; git diff nnoremap ga :!clear; git add %; git status nnoremap gg :!clear; git add %; git commit -m '' nnoremap gs :!VIMRUNTIME= st -t WM_FORCE_FLOATING -g 230x62 tig status "}}} " movement/navigation{{{ +nnoremap j :resize -5 +nnoremap k :resize +5 +nnoremap l :vertical resize +5 +nnoremap h :vertical resize -5 " alias for :tjump nnoremap tj g " alias for :ptjump @@ -363,7 +396,6 @@ inoremap jjrg :reg inoremap :w :w inoremap [:w :w inoremap {:w :w -nnoremap ''; ''; "}}} " working_with_underscores{{{