how to close vi editor code example
Example 1: vim discard changes and quit command
Vim editor:
Insert: hit I key
Discard and exit: esc q!
Save and exit: esc qw
Example 2: close vim
wq – Save the file and exit Vim
Vim editor:
Insert: hit I key
Discard and exit: esc q!
Save and exit: esc qw
wq – Save the file and exit Vim