exit insert mode vim code example
Example: exit insert mode vi
# if stuck in the --INSERT-- mode
# press ESC to exit
:q! #to not save changes
:wq #to save changes
# if stuck in the --INSERT-- mode
# press ESC to exit
:q! #to not save changes
:wq #to save changes