KSH vi mode (auto complete)

Daily, I log into unix servers where the only installed shell is KSH.
I really miss the the auto-completion provided by the ‘tab’ key of BASH shells.

Something similar can be activated on KSH, by setting it to to the so called ‘VI’ mode.

set -o vi

in your .profile or .login scripts.
You can now enjoy the vi editor commands (and more) right from the command prompt.

To envoke the editor, simply hit the ESC key. Just like going from input mode to command mode inside of vi. Some of the more useful key strokes:

ESC+\ = autocomplete, will complete upto the non-unique character.
ESC+* = space delimited list of all files that match the pattern you started with.
ESC+/str = search the commandline history for str.
ESC+n = search for the next occurance of str.
ESC+k = go back one in the commandline history.
ESC+j = go forward one in the commandline history.
ESC+$ = go to the end of the current line
ESC+0 = go to the beginning of the current line
ESC+i = return to insert mode
ESC+A = append to the end of the current line
ESC+I = insert from the beginning of the current line
ESC+fx = move cursor to the right until the next occurance of x
ESC+Fx = move cursor to the left until the next occurance of x
ESC+x = delete character under cursor and place it in the buffer
ESC+p = place the contents of the buffer after the cursor
(combining the last two keystrokes)
ESC+xp = transpose two characters (I use this alot)