Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I looked through the vim manual, and I could only find the commands for "write and quit" and "write (if edited) and quit". Is there a command for "write out without quitting", similar to ^o in nano?

share|improve this question
One may wonder exactly how you read the manual given that :help write and :help writing get you straight to the solution. – Stéphane Chazelas Jan 15 '13 at 15:21
up vote 18 down vote accepted

Use the write command:


Which can be abbreviated:


If you want to write to another file without changing the current file, supply a different filename to the write command:

:write newfile

If you want to write to another file and change to that file, use the saveas command:

:saveas newfile

Which can be abbreviated:

:s newfile
share|improve this answer
Or, abbreviated, just use :w, or :s newfile – Christopher Jan 15 '13 at 14:07
And :wa to :write all opened files/buffers. – user13742 Jan 15 '13 at 14:09
And :w! to force an over-write. – goldilocks Jan 15 '13 at 14:28
You may want to incorporate what the comments says to make your answer more complete. – N.N. Feb 16 '13 at 2:15
@N.N.: The abbreviated versions should be part of the answer, but I'm not so sure about the other use-cases. – Thor Feb 16 '13 at 12:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.