" Unmap arrow keys in normal mode to remove bad habits nnoremap nnoremap nnoremap nnoremap " Stop search highlight with Esc in normal mode (until next search) nnoremap :noh " System clipboard interactions map "+y vnoremap "+p " Start spell-check map s :setlocal spell! spelllang=en_us " Use space for folding/unfolding sections nnoremap za vnoremap zf " Use shift to move 10 lines up/down quickly noremap K 10k noremap J 10j " Enable/Disable auto comment map c :setlocal formatoptions-=cro map C :setlocal formatoptions=cro " Tab navigation nnoremap gt nnoremap gT nnoremap :tabnew nnoremap :tabmove + nnoremap :tabmove - nnoremap :tabp nnoremap :tabn " Remap splits navigation to just CTRL + hjkl nnoremap h nnoremap j nnoremap k nnoremap l " Make adjusting split sizes a bit more friendly noremap :vertical resize +3 noremap :vertical resize -3 noremap :resize +3 noremap :resize -3 " Alias replace all nnoremap :%s//gI " Save file as sudo when no write permissions cmap w!! w !sudo tee > /dev/null % " Don't leave visual mode after indenting vmap < >gv " Compile opened file (using custom comp script) nnoremap :w \| !comp % " Shell check nnoremap p :!shellcheck % " Redefine the incredibely annoying mappings that trigger " dynamic SQL completion with dbext and keeps on freezing " vim whenever pressed with a message saying that " dbext plugin isn't installed... " See :h ft-sql.txt let g:omni_sql_no_default_maps = 1