leave writing mode in vim code example
Example 1: exit vim
#Press 'Esc' to change from Edit Mode to Command Mode
#Exit
:q
#Force quit without saving
:q!
#Save file and quit
:wq
Example 2: vim insert
i - insert before the cursor
I - insert at the beginning of the line
a - insert (append) after the cursor
A - insert (append) at the end of the line
o - append (open) a new line below the current line
O - append (open) a new line above the current line
ea - insert (append) at the end of the word