Last Updated: February 25, 2016
· np1

Use vi keybindings in Terminal window

I find this extremely useful when typing long commands in bash:

To enable Vi-mode, edit (or create) the file ~/.inputrc or /etc/inputrc and add the following lines:

set editing-mode vi
set keymap vi-command

Restart your terminal and you'll have Vi keybindings. By default, you're in insert mode; press Esc to enter command mode.