quit vi file code example Example: vim discard changes and quit command Vim editor: Insert: hit I key Discard and exit: esc q! Save and exit: esc qw