Vim 001 - Exit like a millionaire

Publish date: Sep 20, 2022
Author: Nemanja

If you are here you most likely have a problem with exiting Vim?. So let’s fix that.

The way that all people of Planet Earth know:

  
  :wq
  

which stands for write/save and quit. This will do the just fine, and you will be outside of Vim.

Another way that will do the same thing but, it’s a bit shorter:

  
  :x
  

The fastest way that does exact same thing like previous two commands:

  
  ZZ
  

If you want to exit without saving the file you can do:

  
  :q!
  

but, better, faster way:

  
  ZQ
  

Now you know how to exit Vim like a millionaire :).