Skip to content

Instantly share code, notes, and snippets.

@aramperes
Last active May 25, 2021 07:21
Show Gist options
  • Save aramperes/8d8adb677a30b135c24bb3d8019c6404 to your computer and use it in GitHub Desktop.
Save aramperes/8d8adb677a30b135c24bb3d8019c6404 to your computer and use it in GitHub Desktop.
My personal notebook for day-to-day vim usage

vimnotes

My personal notebook for day-to-day vim usage.

Individual commands (normal mode)

  • i / [Insert] enters insert mode at current character
  • I enters insert mode at beginning of line
  • a enters insert mode at next character
  • A enters insert mode at end of line
  • $ goto end of line
  • G goto end of file, first char
  • gg goto beginning of file, first char
  • w goto next word (beginning)
  • e goto end of current/next word
  • dd cut line
  • yy copy line
  • p paste buffer
  • u undo
  • cw rewrite word
  • cc rewrite line
  • v visual select
  • y copy visual selection
  • :!<cmd> executes <cmd> in shell
  • /<text> searches for <text> in file
  • n goes to next search result
  • :%s/<search>/<replace>/g replaces all <search> with <replace>

Useful combinations

  • yyp copy and paste (duplicate) line
  • ea append at end of word
  • GA append at enf of file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment