3 ms·
A really useful one for vi / vim users is: $ set -o vi Now you can edit the shell command lines (including the history) using vi / vim commands. By defaul
by fuzztester 3y ago
A really useful one for vi / vim users is:
$ set -o vi
Now you can edit the shell command lines (including the history) using vi / vim commands.
By default you will be in append mode.
You can press Esc to go back to command mode.
Then you can edit the current command using vi commands, and also go upward in the history using the k command, to edit any previous history line.
When done editing, hit Enter, and the edited command will be executed by the shell.
You can put the above set command in your .profile so that it always works.