I have seen that sometimes
:q works but sometimes we have to use
:q!. This is the case for many commands. I was wondering what is the general use of
vim and when to use it. I tried to google this, but it seems the search is omitting the exclamation mark.
When you make no changes to the actual content of the file, you can simply quit with
You can write changes out and quit with
As an aside you can also use
Vim also has builtin help which you can access via