- Press
ESCto enter command mode; a/ito enter insert mode;ddto delete a line;xto delete the character under the cursor;:qquit;:q!quit without saving;:wqwrite the buffer and quit.
ESC to enter command mode;a/i to enter insert mode;dd to delete a line;x to delete the character under the cursor;:q quit; :q! quit without saving; :wq write the buffer and quit.