Shortcut
Vim Quit Shortcut
The Vim shortcut to quit is :q then Enter on Windows. It's the same on Mac.
Quick Answer
- Windows
- :q then Enter
- Mac
- :q then Enter
- Web
- Not confirmed yet
VimShortcut
Quit
Closes the file, but only if nothing changed.
How to quit in Vim
- Open Vim and go to where you want to quit.
- Press :q then Enter on Windows or :q then Enter on Mac.
Vim Quit Shortcut for Windows
Press :q then Enter.
Vim Quit Shortcut for Mac
Press :q then Enter.
Vim Quit Shortcut for Vim Web
We haven't confirmed a Vim Web shortcut for this yet.
Related Keyboard Shortcuts
Frequently asked questions
What is the Vim quit shortcut?
On Windows, press :q then Enter. On a Mac, press :q then Enter.
Is there a Mac shortcut to quit in Vim?
Yes: :q then Enter.
Does it work in Vim for the web?
We haven't confirmed a web version shortcut for this yet.
Official source · How we verify