" dotfiles -- .vim/vimrc_files/keymaps.vim " author: johannst " set leader key "execute "set =\es" let mapleader="S" " re-source .vimrc map v :source ~/.vimrc "remap esc button imap jj " prevent quit accidentlty map :q :bd map :qa :bd map :wq :w:bd noremap q :q " re-adjust indentation map f mzgg=G`z " navigate between different splits map j map k map l map h map j map k map l map h " resize splits "map 5- "map 5+ "map 5< "map 5> " navigate between different buffers nnoremap :bprevious nnoremap :bnext nnoremap :bprevious nnoremap :bnext " ctrl-ae jump to line start/end nnoremap 0 nnoremap $ inoremap 0 inoremap $ vnoremap 0 vnoremap $ cnoremap cnoremap " Shortcut to toggle relative numbering mode nnoremap :call ToggleRelativeNumber() " add a marker fold snippet (for C/C++) nnoremap o//{{{ o//}}}A imap " only works with v-block (not v-line) vnoremap VV''>o//}}}'<A " substitute selection vnoremap "hy:%s/h/h/gc " yank/paste into/from register vnoremap "ay inoremap a cnoremap a " +-----------------+ " | Plugin specific | " +-----------------+ " Open BufferExplorer nnoremap :call BufExplorer() " Toggle Tagbar nnoremap t :TagbarToggle " build tags of your own project with Ctrl-F12 map :!ctags -R --sort=yes --c++-kinds=+pl --fields=+iaS --extra=+q --language-force=C++ .