nnoremap let g:mapleader = ' ' " easy config nmap :e $HOME/.vimrc nmap :so $HOME/.vimrc " Force saving files that require root permission command! SUDOwrite :execute 'w !sudo tee > /dev/null %' | edit! " Bubble single lines nmap :m-2== nmap :m+== imap :m-2==gi imap :m+==gi " Bubble multiple lines vmap :m-2gv=gv vmap :m'>+gv=gv " Indent lines using and vmap >gv nmap >> imap >>i vmap << imap < :lprevious " noremap :lnext " moving through buffers " noremap :bn " noremap :bp noremap bd :bd noremap wc :bd noremap bo :Bufonly " Remap window commands " map ws :wincmd s " map wv :wincmd v " map wc :wincmd c " map wn :wincmd n " map wo :wincmd o " map w+ :wincmd _ " map w- :wincmd " map w= :wincmd = " nmap + :vertical resize +20 " nmap - :vertical resize -20 " map :wincmd > " map :wincmd j " map :wincmd j " map :wincmd k " map :wincmd k " map :wincmd h " map :wincmd h " map :wincmd l " map :wincmd l nnoremap :wincmd K nnoremap :wincmd J nnoremap :wincmd H nnoremap :wincmd L nnoremap :wincmd k nnoremap :wincmd j nnoremap :wincmd h nnoremap :wincmd l inoremap :wincmd k inoremap :wincmd j inoremap :wincmd h inoremap :wincmd l " tags nmap :exec("tjump ".expand("")) nmap :split:exec("tjump ".expand("")) " trigger NERDTree, Tagbar $ Co. nmap n :NERDTreeToggle nmap t :TagbarToggle " nmap f "zyaw :exe ":Ack ".@z."" nmap :CtrlP nmap :CtrlPTag nmap :CtrlPBuffer " grep word under cursor nnoremap f :lgr! "\b\b":cw " paste from system clipboard inoremap :set paste"+p :set nopaste " toggle spellcheck nmap :setlocal spell! spelllang=en_us " cursor jump nnoremap 3k inoremap :-3i vnoremap 3k nnoremap 3j inoremap :+3i vnoremap 3j nnoremap 6k inoremap :-6i vnoremap 6k nnoremap 6j inoremap :+6i vnoremap 6j " scrolling nnoremap 10 inoremap 10i vnoremap 10 nnoremap 10 inoremap 10i vnoremap 10 " F keys nmap :noh imap :noh nmap :YcmCompleter GoToDeclaration nmap :YcmCompleter GoTo nmap :YcmCompleter GoTo:wincmd o noremap :FufBuffer nmap :call ManCurrentWord() nmap :call DevHelpCurrentWord() nnoremap :call NERDComment("n", "Toggle") vnoremap :call NERDComment("v", "Toggle") " nmap " plugins etc noremap :NERDTreeToggle noremap :TagbarToggle inoremap :TagbarToggle " remap visual block nnoremap " write noremap :w inoremap :w " exit noremap :qa! inoremap :qa! " paste nnoremap "+gPl vnoremap :call Paste("v") inoremap :call Paste("i") " select all nnoremap ggVG inoremap :call Select()