Skip to content

Instantly share code, notes, and snippets.

@niorad
Last active January 29, 2016 12:08
Show Gist options
  • Save niorad/fbc2c67ab4f1aae425a7 to your computer and use it in GitHub Desktop.
Save niorad/fbc2c67ab4f1aae425a7 to your computer and use it in GitHub Desktop.
Some useful VIM-Shortcuts and Commands

In command mode

  • ddp Swap position of current line with next line (dd = Delete line, which also yanks it; p = Paste yanked line)
  • YP Duplicate current line (Y = Yank entire line; P = Paste line above active line (p for below))
  • dat Delete the current tag and its contents (d = Delete; a = Around; t = Tag)

In Visual Mode

  • :w filename.txt Saves the current selection as a new file filename.txt (w = Write)

In NERDTree

  • ma {filename} ENTER Add new file to the current folder (m = Open menu; a = Add new child-node)
  • mr Reveal highlighted file in Finder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment