Unlock your productivity with Vim For Developers book!

How To Exit Vim

November 12, 2021

How to quite Vim?

Well, there are multiple options.

That largely depends on whether you want to abandon the changes you made or save them.

First, press Esc to get back to normal mode.

  • :qa! to close all files and quit abandoning all the changes
  • :wqa to save all files and quit
  • ZZ in normal mode writes the current file and exits
  • :x same as above

Learn more

There's not much more to it, but if you want, you can read help docs :help quit, which is always a good idea.

Vim For Developers

Vim For Developers

Learn Vim and upgrade your productivity to the next level by building the IDE of your dreams.