Common Vim shortcuts

Quick Navigation in Preview Mode

  • 0: Jump to the beginning of the line
  • ^: Jump to the first non-whitespace character of the current line
  • $: Jump to the end of the line
  • g_: Jump to the last non-whitespace character of the current line

To go directly to the end of the line and start inserting, press A, which is equivalent to pressing $ followed by a.

Quick Deletion in Preview Mode
dd: Delete the current line
2dd: Delete the current line and the next line (2 lines total)
D: Delete from the cursor position to the end of the line
d0: Delete from the cursor position to the beginning of the line
u: Undo the last deletion
p: Paste the deleted line below the current line
P: Paste the deleted line above the current line

Reference