Quit only if all changes are saved
Quit without saving all changes
Save all changes and quit
Move horizontally to the left
Move horizontally to the right
Move vertically down
Move vertically up
Move to the top of the file
Move to the bottom of the file
Move forward by one word
Move forward by one word but ignore punctuation, space will be used as word seperator.
Move to the end of a word
Move back by one word
Move back by one word but ignore punctuation, space will be used as word seperator.
Move to the beginning of a line
Move to the end of a line
Move right
Move one paragraph up
Move one paragraph down
Move to first character in the previous line.
Move to the first character in the next line
Show matching curly brace or parenthesis
Insert text before current cursor position
Insert text after current cursor position
Insert text at the beginning of the cursor line
Insert text at the end of the cursor line
Open up a new line following the current line in insert mode
Open up a new line above the current line in insert mode
Move to a character(to the left of it), e.g t(
will move to the ( character in the line.
You can press ;
multiple times afterwards to scroll through other matching characters in the line.
Move to a character(to the exact position), e.g t(
will move to the (
character in the line.
scroll through every word matching the word under the cursor
Enter visual mode and select text below the cursor as it moves, you can copy or delete the selected text.
Enter visual-line mode and select text in the cursor line as it moves, you can copy or delete the selected text.
Copy selected text or text below the cursor
Copy text in the whole cursor line
Copy text from the current cursor position(not including) to the beginning of the line.
Copy text from the current cursor position to the end of the line
Paste deleted or copied text one line below the cursor line or from the character after the cursor if it was selected in visual mode.
Paste deleted or copied text one line above the cursor line or from the character after the cursor if it was selected in visual mode.
Delete, should be followed by a movement e.g db
(delete one word backwards),
dw
(delete one word forward), dl
(delete one character forward starting from the
character under the cursor), d{
(delete one paragragh up), d}
(delete one paragraph down).
Delete a word starting from the character under the cursor
Delete the specified number of words from the character under the cursor.
e.g d5w
to delete five words
Delete everything to the right from the current cursor position
Example, dt)
will delete everything from the character under the cursor to(but not including) the )
character.
Delete everything from the current cursor line to the beginning of the file
Delete everything from the current cursor line to the end of the file
Delete the character under the cursor
Delete a given number of letters from the current position
Delete the rest of the line starting from the current cursor position and enter insert mode.
Example, cw
will delete a word from the character under the cursor and put you in insert mode.
Example, ct)
will delete everything from the character under the cursor to(but not including) the )
character and put you in insert mode.
Undo a change
Redo your undo(s).
Repeat the thing you just did, e.g repeat a line deletion,a paste e.t.c
Switch the case of the character under the cursor. You can also do <number>~
to repeat the action across n number of letters. e.g 3~
will switch the case of
3 letters from the current cursor position.
Replace the character under the cursor with a different character. You can also give it
the number if characters to replace e.g 3ro
will replace 3 characters from the cursor
position with o
Puts you in replace mode and as you type the characters under the cursor will be replaced with the typed characters.
Indent selected code or code in the cursor line. e.g 3>>
will indent
3 lines starting from the current line.
Check from 41:00 here