Skip to content

Instantly share code, notes, and snippets.

@jlant
Last active August 29, 2015 14:23
Show Gist options
  • Save jlant/373eb34ca31d9bddb8f4 to your computer and use it in GitHub Desktop.
Save jlant/373eb34ca31d9bddb8f4 to your computer and use it in GitHub Desktop.
Vim - some helpful commands.

Vim commands

Delete large sections of text

Go to first line to be deleted and type ma (mark a) Go to last line to be deleted and type d'a (delete to mark a)

Select and copy all text to a new file

ggVG - go to first row, first column, enter visual mode then go to last row, last column y - yank :e some-copy.txt - create a new file called some-copy.txt p - paste from internal buffer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment