I've been using set -o vi for a while but didn't realize its full potential for a while.
| Key | Function | Description |
|---|---|---|
| Ctrl-d | rl_vi_eof_maybe | Signals EOF if line is empty, otherwise deletes char. |
| Ctrl-e | rl_emacs_editing_mode | Switch to Emacs editing mode. |
| Ctrl-g | rl_abort | Cancel current operation; beep. |
| Ctrl-h | rl_backward_char | Move cursor left one character. |
| Ctrl-j | rl_newline | Accept line (like Enter). |
| Ctrl-k | rl_kill_line | Delete from cursor to end of line. |
| Ctrl-l | rl_clear_screen | Clear and redraw the screen. |
| Ctrl-m | rl_newline | Accept line. |
| Ctrl-n | rl_get_next_history | Next line in history. |
| Ctrl-p | rl_get_previous_history | Previous line in history. |
| Ctrl-q | rl_quoted_insert | Insert next typed character literally. |
| Ctrl-r | rl_reverse_search_history | Search backward in history. |
| Ctrl-s | rl_forward_search_history | Search forward in history. |
| Ctrl-t | rl_transpose_chars | Swap previous two characters. |
| Ctrl-u | rl_unix_line_discard | Delete everything before cursor. |
| Ctrl-v | rl_quoted_insert | Insert next key literally. |
| Ctrl-w | rl_vi_unix_word_rubout | Delete previous word. |
| Ctrl-y | rl_yank | Paste last killed text. |
| Ctrl-_ | rl_vi_undo | Undo last edit. |
| SPACE | rl_forward_char | Move cursor right. |
| # | rl_insert_comment | Insert comment marker and accept line. |
| $ | rl_end_of_line | Move to end of line. |
| % | rl_vi_match | Jump to matching bracket. |
| & | rl_vi_tilde_expand | Expand ~ in filename contexts. |
| * | rl_vi_complete | Vi-style completion. |
| + | rl_get_next_history | Next history entry. |
| , | rl_vi_char_search | Repeat last character search backward. |
| - | rl_get_previous_history | Previous history entry. |
| . | rl_vi_redo | Repeat last change. |
| / | rl_vi_search | Search forward. |
| 0 | rl_beg_of_line | Move to beginning of line. |
| 1–9 | rl_vi_arg_digit | Set numeric argument prefix. |
| ; | rl_vi_char_search | Repeat last f/F/t/T search. |
| = | rl_vi_complete | Complete word. |
| ? | rl_vi_search | Search backward. |
| A | rl_vi_append_eol | Append at end of line. |
| B | rl_vi_prev_word | Move backward by word. |
| C | rl_vi_change_to | Change text to end of motion. |
| D | rl_vi_delete_to | Delete text to motion. |
| E | rl_vi_end_word | Move to end of word. |
| F | rl_vi_char_search | Find character backward. |
| G | rl_vi_fetch_history | Go to history line N. |
| I | rl_vi_insert_beg | Insert at beginning of line. |
| N | rl_vi_search_again | Repeat last search (same direction). |
| P | rl_vi_put | Paste text after cursor. |
| R | rl_vi_replace | Enter replace mode. |
| S | rl_vi_subst | Substitute entire line (delete + insert). |
| T | rl_vi_char_search | Search before character backward. |
| U | rl_revert_line | Undo all changes to line. |
| W | rl_vi_next_word | Move forward by word. |
| X | rl_vi_rubout | Delete previous character. |
| Y | rl_vi_yank_to | Yank (copy) text to motion. |
| \ | rl_vi_complete | Complete word. |
| ^ | rl_vi_first_print | Move to first non-whitespace character. |
| _ | rl_vi_yank_arg | Insert last argument from previous command. |
| ` | rl_vi_goto_mark | Jump to mark. |
| a | rl_vi_append_mode | Append after cursor. |
| b | rl_vi_prev_word | Back one word. |
| c | rl_vi_change_to | Change text until motion. |
| d | rl_vi_delete_to | Delete until motion. |
| e | rl_vi_end_word | Move to end of current word. |
| f | rl_vi_char_search | Find character forward. |
| h | rl_backward_char | Move left. |
| i | rl_vi_insert_mode | Enter insert mode. |
| j | rl_get_next_history | Move down in history. |
| k | rl_get_previous_history | Move up in history. |
| l | rl_forward_char | Move right. |
| m | rl_vi_set_mark | Set a mark. |
| n | rl_vi_search_again | Repeat search forward. |
| p | rl_vi_put | Paste before cursor. |
| r | rl_vi_change_char | Replace a single character. |
| s | rl_vi_subst | Substitute characters (delete + insert). |
| t | rl_vi_char_search | Search until before character. |
| u | rl_vi_undo | Undo last edit. |
| w | rl_vi_next_word | Move forward one word. |
| x | rl_vi_delete | Delete character under cursor. |
| y | rl_vi_yank_to | Yank text defined by motion. |
| | | rl_vi_column | Move to specified column. |
| ~ | rl_vi_change_case | Toggle case of character. |
Also if you like seeing the current mode don't forget to put set show-mode-in-prompt on into /etc/inputrc or ~/.inputrc