Use this tag for questions about exiting vim.
This tag is for questions about closing the vim text editor. From troubleshooting problems closing it, to configuring what happens when you close it.
By default, there are three ways to exit vim from normal mode:
:q<cr>This will quit without saving. If there are unsaved changes, you must add an exclamation mark to force it:
:x<cr>This will quit and save.
ZZThis is just a synonym of
If you are using graphical vim (Gvim), you may also quit by clicking on the exit button on the window.