It seems to be somewhat a new trend lately to talk about exiting Vim editor. Just today alone, I saw 2 articles and 3 memes in my Facebook newsfeed about how so many people can’t figure this out. So here it is, hoping to help a few people get more visitors to my site:

1. Press Esc to get into command mode
2. Type :quit and hit Enter

Alternatively, you can also:

  • type :quit! to quit without saving
  • type :wq to write and quit
  • type :x to write and quit, but only if there are changes from last write
  • type :wq! to force write and quit, this will force write even if user doesn’t have write permission
  • type :qa for quit all

That’s it. Nice and easy.