You can use vi mode editing in any program that uses readline
ctrl - alt - j
( C-M-j in emacs lingo)
ctrl - alt - j
( C-M-j in emacs lingo)
set editing-mode vi
$if mode=vi
set keymap vi-command
"gg": beginning-of-history
"G": end-of-history
set keymap vi-insert
"jj": vi-movement-mode
"\C-p": history-search-backward C-L: clear-screen
You really only need the first line for the apps to start in vi mode automatically.
Knowing the key combination to toggle is still useful for when pairing etc...
It makes sense for "gg" to be absent, as it is not a vi command. It is a "vimism". The typical vi command for moving to the first line is "1G".
bind -v
bind "^R" em-inc-search-prev
bind \\t rl_complete
(NOTE: I forget the source for this, it was something like oh-my-vim but I can't find exactly where it was from.)rlwrap <command>
For example, when working with SML/NJ, which has an interactive REPL but no history support or command-line niceties, you can run
rlwrap sml
And get all the benefits of Vi, history files, etc.
"<esc> /pattern" to search back in the history buffer
The only tricky one for bash is "<esc> =" for file completion.
http://5digits.org/pentadactyl/
"Pentadactyl was once called Vimperator, initially written by Martin Stubenschrott, then developed and maintained by Doug Kearns, Kris Maglione, and several other invaluable contributors. Doug and Kris, the primary Vimperator developers for several years, have left the Vimperator project and now develop and maintain Pentadactyl in its stead."