ztch3w
Last Updated: February 25, 2016
·
274
· sheerun

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

2 Responses
Add your response

6521

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

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

over 1 year ago ·
Filed Under