diff --git a/vimrc b/vimrc index 35ccd93..6f60b9b 100644 --- a/vimrc +++ b/vimrc @@ -77,35 +77,35 @@ set wrapmargin=0 " key #mappings{{{ let g:mapleader = "\" -nnoremap rc :so $MYVIMRC +nnoremap rc :so $MYVIMRC " Focus on current fold, close the rest -nnoremap zz zMzvzz +nnoremap zz zMzvzz " replace current word with last yanked/deleted text -nnoremap rr "_diwP +nnoremap rr "_diwP " replace current word with last yanked text -nnoremap ry diw"0P +nnoremap ry diw"0P inoremap jk nnoremap A :call CheckLineEnding() -nnoremap co :!clear; +nnoremap co :!clear; -nnoremap gs :!clear; echo 'git status'; git status -nnoremap gd :!clear; echo 'git diff'; git diff -nnoremap ga :!clear; git add %; git status -nnoremap gA :!clear; git add .; git status -nnoremap gc :!clear; git commit -m '' -nnoremap gg :!clear; git add %; git commit -m '' -nnoremap gp :!clear; echo 'git push'; git push -nnoremap gl :!clear; git log +nnoremap gs :!clear; echo 'git status'; git status +nnoremap gd :!clear; echo 'git diff'; git diff +nnoremap ga :!clear; git add %; git status +nnoremap gA :!clear; git add .; git status +nnoremap gc :!clear; git commit -m '' +nnoremap gg :!clear; git add %; git commit -m '' +nnoremap gp :!clear; echo 'git push'; git push +nnoremap gl :!clear; git log " netrw -nnoremap ex :Ex -nnoremap ee :e . -nnoremap eq :Rex +nnoremap ex :Ex +nnoremap ee :e . +nnoremap eq :Rex " better window navigaton nnoremap h @@ -120,29 +120,29 @@ nnoremap h :vertical resize -5 nnoremap = = "location list and quickfix mappings -nnoremap ll :botright lwindow -nnoremap lp :lprev -nnoremap ln :lnext -nnoremap lc :lclose -nnoremap llh :lhistory -nnoremap llp :lolder -nnoremap lln :lnewer +nnoremap ll :botright lwindow +nnoremap lp :lprev +nnoremap ln :lnext +nnoremap lc :lclose +nnoremap llh :lhistory +nnoremap llp :lolder +nnoremap lln :lnewer -nnoremap qf :botright cwindow -nnoremap qp :cprev -nnoremap qn :cnext -nnoremap qc :cclose -nnoremap qfh :chistory -nnoremap qfp :colder -nnoremap qfn :cnewer +nnoremap qf :botright cwindow +nnoremap qp :cprev +nnoremap qn :cnext +nnoremap qc :cclose +nnoremap qfh :chistory +nnoremap qfp :colder +nnoremap qfn :cnewer -nnoremap nh :noh +nnoremap nh :noh " quick grep of visual selection -vnoremap gr y:grep! -R " . +vnoremap gr y:grep! -R " . " open quickfix window of TODOs -nnoremap td :grep! -R '// *TODO' .:botright cwindow:echo len(getqflist()) 'TODOs' +nnoremap td :grep! -R '// *TODO' .:botright cwindow:echo len(getqflist()) 'TODOs' " brace/quotes completion inoremap {{ {} @@ -163,11 +163,11 @@ inoremap '; ''; inoremap ;; ; -nnoremap nn :set invrelativenumber -nnoremap hl :nohlsearch +nnoremap nn :set invrelativenumber +nnoremap hl :nohlsearch " devdocs mapping -nnoremap dd :DD +nnoremap dd :DD "}}} " #abbreviations{{{ @@ -244,7 +244,7 @@ endfunction"}}} function! SyntaxItem() abort "{{{ return synIDattr(synID(line('.'),col('.'),1),'name') . ' -> ' . synIDattr(synIDtrans(synID(line('.'),col('.'),1)), 'name' ) endfunction -nnoremap p :echom SyntaxItem()"}}} +nnoremap p :echom SyntaxItem()"}}} " devdocs DD " https://gist.github.com/romainl/8d3b73428b4366f75a19be2dad2f0987#file-devdocs-vim @@ -276,7 +276,7 @@ if !exists('*RangerExplorer') "{{{ endif redraw! endfun - map ra :call RangerExplorer() + map ra :call RangerExplorer() endif"}}} function! GetLinterStatus(key) abort "{{{ diff --git a/vimrc.d/statusline.vim b/vimrc.d/statusline.vim index af1a5b1..32c4e2a 100644 --- a/vimrc.d/statusline.vim +++ b/vimrc.d/statusline.vim @@ -47,7 +47,7 @@ function! GetStatus(isactive) " current register if a:isactive let l:statusline.=l:separator . l:active - let l:ttatusline.=' %#StatusLineActiveQuotes#"' . l:active . '%{v:register}%#StatusLineActiveQuotes#" ' + let l:statusline.=' %#StatusLineActiveQuotes#"' . l:active . '%{v:register}%#StatusLineActiveQuotes#" ' endif diff --git a/vimrc.plugins.vim b/vimrc.plugins.vim index 80e144c..953204d 100644 --- a/vimrc.plugins.vim +++ b/vimrc.plugins.vim @@ -129,8 +129,8 @@ augroup END " ALE -nnoremap ne :lnext -nnoremap pe :lprev +nnoremap ne :lnext +nnoremap pe :lprev let g:ale_sign_error = '>>' let g:ale_sign_warning = '--' @@ -155,14 +155,14 @@ let g:netrw_list_hide='^\..*' " bufexploer -nnoremap o :BufExplorer +nnoremap o :BufExplorer " undotree -nnoremap ut :UndotreeToggle +nnoremap ut :UndotreeToggle " TagBar -nnoremap tb :TagbarOpen fj -nnoremap ] :tag /[.#@]=expand('') +nnoremap tb :TagbarOpen fj +nnoremap ] :tag /[.#@]=expand('') let g:tagbar_autoclose = 1 " let g:tagbar_autopreview = 1 " let g:tagbar_previewwin_pos = ''