Skip to content

Instantly share code, notes, and snippets.

@enamoria
Created December 31, 2019 03:20
Show Gist options
  • Save enamoria/0b648d8cbf4be00eaefeb82fd1fbc58d to your computer and use it in GitHub Desktop.
Save enamoria/0b648d8cbf4be00eaefeb82fd1fbc58d to your computer and use it in GitHub Desktop.
use `vi` mode in bash (jk for up and down, no more arrow key)
# edit ~/.inputrc
# want vi to be the default editor for readline
set editing-mode vi
# vi settings
$if mode=vi
# normal mode
set keymap vi-command
"j": previous-history
"k": next-history
"l": forward-char
"h": backward-char
"G": end-of-history
# insert mode
set keymap vi-insert
"jj": vi-movement-mode # remap escape
$endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment