So you were following a coding tutorial and somehow you got stuck in
Have no fear, you too can exit
- Hit your
esckey, to enter NORMAL mode
- Type a colon
:, putting you in Command Line Mode
:q!to exit without saving
psst… There’s other ways to exit
vim too, for the pros in the room:
:q - "Please Quit, I already saved." :wq! - "Save and quit, damnit!" :x - "Save and Quit for me." :exit - "Exit and save please." ZZ - "Quit vim."
So as you can see, the developers knew that people would get stuck in
vi/vim so they gave us 37.9 million ways to get out.
Have a great day, and long live