Vim Cheatsheet
Movements
ctrl + d/u
: Page up and downw
: Beginning of next workb
: Beginning of the word beforef + <char>
: Find next char2f + <char>
: Find 2nd occurrence of charF + <char>
: Find char backwards;
: Cycle to nextf/F
find hit;
: Cycle to previousf/F
find hitctrl + o
: Move to last positiongv
: Re-select last selection
Viewing
ctrl + y/e
: Move up/down without moving the cursor!z + enter
: Redraw, cursor line on top of windowz + -
: Redraw, cursor line on bottom of window- `z + . : Redraw, cursor line in center of window
Editing
dt<char>
: Delete from cursor up to char (excluding)df<char>
: Delete from cursor until char (including)ci(
: Change inner section of parenthesisca(
: Change section including parenthesis:s/vi/VIM/g
: Replace all occurrences of vi with VIM:s: vi : VIM :g
: Replace all occurrences of vi with VIM (with spaces around)d])
: Delete until next unmatched)
, regardless of lines in between