" Disable left, right, up and down keys " In normal mode... nnoremap :echoe "Use h" nnoremap :echoe "Use l" nnoremap :echoe "Use k" nnoremap :echoe "Use j" " ...and in insert mode inoremap :echoe "Use h" inoremap :echoe "Use l" inoremap :echoe "Use k" inoremap :echoe "Use j" " Unbind some useless/annoying default key bindings. nmap Q " Don't do anything on pressing space itself nnoremap vnoremap " Make space-bar the leader-key let mapleader = " " let maplocalleader = " " " Center the cursor when moving through document nnoremap zz nnoremap zz nnoremap g; g;zz nnoremap g, g,zz nnoremap zz nnoremap zz nnoremap ]s ]szz nnoremap n nzzzv nnoremap N Nzzzv " Move visually selected lines around with J & K vnoremap J :m '>+1gv=gv vnoremap K :m '<-2gv=gv " Keeps the cursor at the same place when doing J " And not move to end of the line nnoremap J mzJ`z:delmarks z " Better window/split navigation map j map k map h map l " Clear searches nnoremap / :call clearmatches():noh " Changes the pwd to the opened file's directory nnoremap cd :lcd %:h " Map easymotion Plugin to j map j (easymotion-s) " Map nerdtree to e " Changes the pwd and opens the VCS root nnoremap e :tcd %:h :NERDTreeToggleVCS " to save everything and quit Neovim nnoremap :wqa vnoremap :wqa nnoremap :wa vnoremap :wa