Skip to content

Instantly share code, notes, and snippets.

@gsquire
Last active November 27, 2018 19:07
Show Gist options
  • Save gsquire/111e3079a0b1a54b74b53b28e25ed84c to your computer and use it in GitHub Desktop.
Save gsquire/111e3079a0b1a54b74b53b28e25ed84c to your computer and use it in GitHub Desktop.

Useful VIM Commands I Never Remember

Folding

  • {n,m}fo: From lines n to m fold them.
  • zo: Open this fold.
  • zc: Close this fold.
  • za: Alternate closing and opening the fold.

Bookmarking

  • m{_}: Mark this line using a lowercase letter to reference later.
  • `{_}: Jump to this bookmark.
  • :marks: See your list of bookmarks.

Copying and Pasting

  • y'{_}: Yank from some bookmark to the end of the line.
  • d'{_}: Delete from some bookmark to the end of the line.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment