Few ways to quit Vim
-
:q
,ZQ
- quit and fail if saved -
:wq
- write and quit -
:x
,ZZ
- write and quit if changes has been made -
:qa
,:wqa
,:xa
- same as above, but for all buffers -
:conf qa
- quit all windows and prompt if not saved
Written by Adam Stankiewicz
Related protips
2 Responses
This is older but just noticed this post. :wq
and ZZ
are not the same command. ZZ
does not alter the last mod time if the file isn't changed, :wq
will. ZZ
and :x
are analogues, however.
over 1 year ago
·
@shawncplus Thank you for noticing it. I fixed the protip.
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Vim
Authors
Related Tags
#vim
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#