For people who actually don’t know this, yet: Type :x.
This means “eXit, save any changes”
If you want to leave and discard your changes, type :q!
The :q means “Quit”, without any other instructions. This will warn you if you changed anything, adding ! means “force this command”.
How to quit vim.
Just read this book:
Used to use gedit, the found nano and it was awesome. Then found Vim… I RAN back to nano haha
Try micro.
It’s much better and quite easy if not easier to use than nano. It should really be the default simple editor.
I vaguely remember pressing Alt+F4 while trying to close vim in a terminal once. It did switch to me login prompt so I thought it worked.
For people who actually don’t know this, yet: Type
:x
.This means “eXit, save any changes”
If you want to leave and discard your changes, type
:q!
The
:q
means “Quit”, without any other instructions. This will warn you if you changed anything, adding!
means “force this command”.