vim: add mapping <caps-lock> and jj and kk to <Esc>

This commit is contained in:
masterzu 2016-11-03 10:46:22 +01:00
parent ae07597fba
commit 87c7087d1b
1 changed files with 18 additions and 0 deletions

View File

@ -216,9 +216,27 @@ augroup END
" nnoremap <F3> :NumbersToggle<CR>
""" keymaps
" no arrows keys no more
nmap <Left> <Nop>
nmap <Right> <Nop>
nmap <Up> <Nop>
nmap <Down> <Nop>
imap <Left> <Nop>
imap <Right> <Nop>
imap <Up> <Nop>
imap <Down> <Nop>
" vmap <Left> <Nop>
" vmap <Right> <Nop>
" vmap <Up> <Nop>
" vmap <Down> <Nop>
nmap K <C-u>
nmap J <C-d>
" Esc remap
imap jj <Esc>
imap kk <Esc>
" map caps-lock with Xvindow
au VimEnter * !xmodmap -e 'clear Lock' -e 'keycode 0x42 = Escape'
au VimLeave * !xmodmap -e 'clear Lock' -e 'keycode 0x42 = Caps_Lock'