Skip to content

Instantly share code, notes, and snippets.

@cchwala
Last active August 22, 2022 11:14
Show Gist options
  • Select an option

  • Save cchwala/24dbd76e25542dfb723bac13215360c6 to your computer and use it in GitHub Desktop.

Select an option

Save cchwala/24dbd76e25542dfb723bac13215360c6 to your computer and use it in GitHub Desktop.
VIM cheat sheet

Most important navigation (besides hjkl)

  • b (back a word), e (end of word), ge (back to end of word)
  • Jump to character in a line using f or t (to go to the position one before the searched char)
  • Change text up to the searched char, e.g. cf and the char you are looking for.
  • H (high), M (middle), L (low) for cursor placement

Jump beween split screens Ctrl-W Ctrl-W

Comment code block (source https://stackoverflow.com/a/1676690/356463)

  1. Ctrl-V (visual block mode)
  2. Select
  3. Press #
  4. Esc and wait some 100ms

Uncomment

  1. Ctrl-V
  2. Select
  3. Press x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment