Tutorial of How to quit the vi editor without saving any changes you’ve made:
- See below if you are currently in insert or append mode
- Press > Esc.
- Press : (colon). Cursor should reappear at the lower left corner of the screen beside a colon prompt.
- Enter the following:
- :q! command will quit the editor. All changes you have made to the document will be lost/not save.