How to save as a new file and keep working on the original one in Vim?

vimguy picture vimguy · Feb 12, 2011 · Viewed 253.1k times · Source

Whenever I use the :sav command, it saves the file with a new name and opens the new file open in Vim.

Is it possible to save the file with a new name but keep the original one open for editing?

Answer

wilhelmtell picture wilhelmtell · Feb 12, 2011

Use the :w command with a filename:

:w other_filename