what is the command to quit vi even though latest changes have not been saved for this vi call?

what is the command to quit vi even though latest changes have not been saved for this vi call?

2 months ago 8
Nature

The command to quit vi without saving any changes made during the current editing session is:

:q!

Here, :q means quit, and the exclamation mark ! forces vi to quit even if there are unsaved changes, discarding those changes

. To use this command, first press the Esc key to ensure you are in normal (command) mode, then type :q! and press Enter. This will exit vi immediately without saving any modifications made since the last save or since opening the file

Read Entire Article