" dotfiles -- .vim/vimrc_files/keymaps.vim " author: johannst " set leader key let mapleader="," " 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 "let ArrowDisableMessage = "Arrow Keys disabled! Better learn hjkl ;)" " Disable arrow keys -- train jklh " nnoremap :echo ArrowDisableMessage " nnoremap :echo ArrowDisableMessage " nnoremap :echo ArrowDisableMessage " nnoremap :echo ArrowDisableMessage " " vnoremap :echo ArrowDisableMessage " vnoremap :echo ArrowDisableMessage " vnoremap :echo ArrowDisableMessage " vnoremap :echo ArrowDisableMessage " " inoremap :echo ArrowDisableMessage " inoremap :echo ArrowDisableMessage " inoremap :echo ArrowDisableMessage " inoremap :echo ArrowDisableMessage " ctrl-hjkl move in insert mode inoremap inoremap inoremap inoremap " ctrl-jk movement in command window cnoremap cnoremap cnoremap cnoremap " navigate between different splits 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 " ctrl-ae jump to line start/end nnoremap 0 nnoremap $ inoremap 0 inoremap $ vnoremap 0 vnoremap $ " Shortcut to toggle relative numbering mode nnoremap :call ToggleRelativeNumber() " add a marker fold snippet (for C/C++) vnoremap VV''>o//}}}'<A nnoremap o//{{{ o//}}}A imap " Open BufferExplorer nnoremap :call BufExplorer() " Toggle Tagbar nnoremap t :TagbarToggle " substitute selection vnoremap "hy:%s/h//gc