emacs Keybinding Function In Command Mode in vi In Insert Mode in vi
Enter insert mode i
Enter command mode Esc or Ctrl-[
Nothing at all Esc or Ctrl-[
Insert character typed Any key except Esc, Ctrl-[, or Tab
Go to beginning of the line and enter insert mode I
Go to end of the line and enter insert mode A
Move cursor one character to the right and enter insert mode a
Delete everything between character under cursor and end of line (inclusive) and put it in the clipboard D
Delete everything between character under cursor and end of line (inclusive), then enter insert mode C
Delete character under cursor and enter insert mode s
Delete everything on the line and enter insert mode S
Up arrow Retrieve previous command from history k
Down-arrow Retrieve next command from history j
Home Go to beginning of the line 0
End Go to end of the line $
Tab Autocomplete method/command Tab
Left-arrow Go backward one character h
Right-arrow Go forward one character l
Ctrl-left-arrow Go backward one word b
Go backward one word (space delimited) B
Ctrl-right-arrow Go forward one word w
Go forward one word (space delimited) W
Meta-left-arrow Go backward one word b
Meta-right-arrow Go forward one word w
Ctrl-A Go to the beginning of the line 0
Ctrl-B Go backward one character h
Ctrl-C Exit the mongo shell Ctrl-d
Ctrl-D Delete a char (or exit the mongo shell)
Ctrl-E Go to the end of the line $
Go to the end of the word e
Go to the end of the word (space delimited) E
Ctrl-F Go forward one character l
Ctrl-G Abort
Ctrl-J Accept/evaluate the line
Ctrl-K Kill/erase the line dd (also puts it in the clipboard)
Ctrl-L or type cls Clear the screen
Ctrl-M Accept/evaluate the line
Ctrl-N Retrieve next command from history j
Ctrl-P Retrieve previous command from history k
Ctrl-R Reverse-search command history ?
Ctrl-S Forward-search command history /
Ctrl-T Transpose characters
Ctrl-U Perform Unix line-discard
Ctrl-W Perform Unix word-rubout
Ctrl-Y Yank
Ctrl-Z Suspend (job control works in linux) Ctrl-Z
Ctrl-H Backward-delete a character X
Ctrl-I Complete, same as Tab
Meta-B Go backward one word b
Meta-C Capitalize word
Meta-D Kill word
Meta-F Go forward one word w
Meta-L Change word to lowercase bgue
Meta-U Change word to uppercase bgUe
Meta-Y Yank-pop
Meta-Backspace Backward-kill word
Meta-< Retrieve the first command in command history 1G
Meta-> Retrieve the last command in command history G
Cursor Movements Not Mentioned Above
move cursor over first instance of 'z' to the right fz
move cursor over first instance of 'z' to the left Fz
move cursor just to the left of first instance of 'z' to the right tz
move cursor just to the right of first instance of 'z' to the left Tz
Repeat last F, f, T, t movement ;
Commands that use a cursor movement
Delete all between current cursor location and where the movement takes you (inclusive) and put it in the clipboarddmovement
Delete all between current cursor location and where the movement takes you (inclusive) and put it in the clipboard, then enter insert modecmovement
Copy all between current cursor location and where the movement takes you (inclusive) into the clipboardymovement
Miscellaneous
Paste after character under cursor p
Paste before character under cursor P
Undo last action that changed text u
Delete character under cursor and put it in the clipboard x
Replace character under cursor with 'z' rz
flip case of character under cursor and move one character to the right ~