You are on page 1of 1

How to get into Insert Mode At Execute Mode

:q - quit without saving


i - inserts the text at current cursor position
:q! - quit forcefully without saving
I - inserts the text at beginning of line
:w - save
a - appends the text after current cursor position
:wq - save & quit
A - appends the text at end of line
:wq! - save & quit forcefully
o - inserts a line below current cursor position
:x - save & quit
O - inserts a line above current cursor position
Shift+ZZ - save & quit
r - replace a single char at current cursor position
:sh - Provides temporary shell

At Execute Mode Delete/Copy/Paste/Undo in command mode

dd - Deletes a line
:set number - Setting line numbers 2dd - Deletes 2 lines
:se nu - Setting line numbers yy - Copy a line
:set nonumber - Removing line numbers 2yy - Copies 2 lines
:se nonu - Removing line numbers p - After deleting or copying, by pressing
:84 - Press enter goes to line 84 ‘p’ the deleted or copied contents will
be pasted below the position of cursor.
u - Undo (can undo 1000 times)
Ctrl+r - Redo
G - Moves cursor to last line of file
5G - Moves cursor to 5th line of file

You might also like