ztch3w
Last Updated: February 25, 2016
·
248
· sheerun
Photo on 08.01.2013 at 04.15

Few ways to quit Vim

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
Say Thanks
Respond

2 Responses
Add your response

6521
D54f65ad3ff9ee1c9c033a403d4b5f9f

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 ·
6526
Photo on 08.01.2013 at 04.15

@shawncplus Thank you for noticing it. I fixed the protip.

over 1 year ago ·