Vi / Vim: Quit Without Saving Command
am a new vi / vim text editor user. How can I quit the vi / vim text editor without saving my changes to a file under Linux / Unix like operating systems?
You can quit the vim or vi text editor without saving any changes you may have made to the file. First, you need to press Esc
key to get out of insert or append mode.
Next type colon (: symbol)
You see the cursor at the lower left corner of the screen. Finally, type the following command to quit without saving anything to a file:
This will force vi/vim to quit the editor, and all changes you have made to the document will be lost forever..
Share this tutorial on:
Fig.01: Vim / vi text editor quit without saving changes command demo