Skip to content

Instantly share code, notes, and snippets.

@beli-sk
Created January 9, 2020 08:45
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 beli-sk/c25f5bac0ae38a932e0d2286df881fcd to your computer and use it in GitHub Desktop.
Save beli-sk/c25f5bac0ae38a932e0d2286df881fcd to your computer and use it in GitHub Desktop.
Bash (or any readline prompt) vi-mode with tweaks
set editing-mode vi
set show-mode-in-prompt on
set vi-ins-mode-string "+"
set vi-cmd-mode-string ":"
$if mode=vi
set keymap vi-command
# these are for vi-command mode
Control-l: clear-screen
set keymap vi-insert
# these are for vi-insert mode
Control-l: clear-screen
$endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment