Skip to content

Instantly share code, notes, and snippets.

@buithehoa
Created May 7, 2015 02:12
Show Gist options
  • Save buithehoa/715f94c5344d53e010c2 to your computer and use it in GitHub Desktop.
Save buithehoa/715f94c5344d53e010c2 to your computer and use it in GitHub Desktop.
Save As in vim
Assumed that I'm editing hello.txt.
:w world.txt will write hello.txt's content to the file world.txt while keeping hello.txt as the opened buffer in vim.
:sav world.txt will first write hello.txt's content to the file world.txt, then close buffer hello.txt, finally open world.txt as the current buffer.
http://stackoverflow.com/a/9927057/87972
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment