Exiting Vim or NeoVim
Info:
Vim and NeoVim, have special shortcuts, to close the file. It is not like the regular apps, for which there is a section for it in the user guides.
Shortcuts:
- In the Normal Mode (you get to it by pressing ESC key on your keyboard:
- :q! + <Enter> : This exits the editor DISCARDING any changes you have made. So it is like exit without saving
How to save a file?
You can either save the file and continue working, or save the file and quit.
- To save the file and continue working, in the NORMAL mode, you should type :w
- To save the file and quit NeoVim, in the NORMAL mode, you should type :wq