2 ms·
If you're a vi(m) user on a *nix OS, running: $ set -o vi at the (ba)sh prompt ($ by default), enables vi-mode command-line editing. (The default is emacs.).
by fuzztester 3y ago
If you're a vi(m) user on a *nix OS, running:
$ set -o vi
at the (ba)sh prompt ($ by default), enables vi-mode command-line editing. (The default is emacs.). You are initially in append mode on the current command line. Now you can do ESC to go to command mode, then use k and j to move up and down respectively in the command history, b and w to move backward or forward, and can use many other vi(m) movement and editing commands on the history lines, including/ and n to search for patterns. Been using this since early days of using Unix. Invaluable productivity aid.