vim quit/save/exit FAQ: How do I quit/exit vim?
Answer: This depends by what you mean by the word "exit". Here's a short list of the different ways I normally quit or exit a vi/vim editor session.
vi exit - no changes made to your file (vim quit command)
If you haven't made any changes to your file you can just quit your vi (or vim) editing session like this: