Skip to content

Instantly share code, notes, and snippets.

@kaneshin
Created February 22, 2017 03:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kaneshin/949ea7490b16e7ce5d5f06efd1074367 to your computer and use it in GitHub Desktop.
Save kaneshin/949ea7490b16e7ce5d5f06efd1074367 to your computer and use it in GitHub Desktop.
" use emacs key bind during command mode and a movement of insert mode
" start of line
cnoremap <c-a> <Home>
inoremap <c-a> <Home>
" back one character
cnoremap <c-b> <Left>
inoremap <c-b> <Left>
" delete character under cursor
cnoremap <c-d> <Del>
inoremap <c-d> <Del>
" end of line
cnoremap <c-e> <End>
inoremap <c-e> <End>
" forward one character
cnoremap <c-f> <Right>
inoremap <c-f> <Right>
" recall newer command-line
cnoremap <c-n> <Down>
" recall previous (older) command-line
cnoremap <c-p> <Up>
" delete character backward
cnoremap <c-h> <BS>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment