" dotfiles -- .vim/vimrc_files/keymaps.vim " author: johannst " set leader key let mapleader="," "remap esc button imap jj " prevent quit accidentlty map :q :close map :wq :w noremap :qq :q noremap d :bd " re-adjust indentation map 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 map j map k map l map h " 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 $ " Shortcut to toggle relative numbering mode nnoremap :call ToggleRelativeNumber() " Open BufferExplorer nnoremap :call BufExplorer() " invoke grep and print output into current buffer nnoremap :read !grep -nI " substituce selection vnoremap "hy:%s/h//gc