set -o vi
to ~/.bashrc.Peteris Krumins also has an article on bash command line editing with some extra information on completion:
http://www.catonmat.net/blog/bash-emacs-editing-mode-cheat-s...
set -o vi
to ~/.bashrc.Peteris Krumins also has an article on bash command line editing with some extra information on completion:
http://www.catonmat.net/blog/bash-emacs-editing-mode-cheat-s...
I haven't actually put the set into my .bashrc yet, I just end up typing it when I realize I'm about to navigate a lot.
> ls /etc/foo/bar
and have my cursor at the end when I realize I want to type ls -l instead. I know there's got to be a faster way than what I'm currently doing, but I'm blanking.
(Yes, I know sometimes tacking on the command line switch at the end will work, but that's not true for all commands).
You can hit `;` if there are multiple incidences of 's'.
that should work for commands without spaces in them.
I remap jj to escape so it is faster than moving my hand.
in ~/.inputrc
set editing-mode vi
$if mode=vi
#normal mode
set keymap vi-insert
"jj": vi-movement-mode
$endif