Modes Flashcards
(35 cards)
Repeats the last change
.
Increases indentation until end of line
> G
Scans line for a specific character after the cursor
f + char
Scans line a specific character before the cursor
F + char
Repeat last find forward command
;
Repeat last find backwards command
,
In one letter,
(1) Delete the character under the cursor
(2) Enter Insert Mode
s
Undo a change
u
Delete from the cursor’s position to the beginning of a word
db
(1) Generally, this is the best way to delete a word
(2) Why so?
(1) daw
(2) This is more repeatable via . than alternatives like dbx and bdw
Copy a line
Y or yy
(1) Add by one
(2) Add by five
(1)
(2) 5
(1) Subtract by one
(2) Subtract by five
(1)
(2) 5
Delete three words
3dw or d3w
Two ways to delete a single character
x or dl
(1) Swap case
(2) Make lowercase
(3) Make uppercase
(1) g~
(2) gu
(3) gU
(1) Shift left
(2) Shift right
(3) Autoindent
(1)
(3) =
Operator-Pending mode is a state that only accepts __________ commands.
motion
List vim’s major modes
Normal
Insert
Visual
Command-Line
List vim’s minor modes
Operator-Pending
Select
Insert-Normal
Two ways to switch from Insert to Normal Mode
Insert-Normal Mode: While in Insert Mode, fire off a single Normal Mode command
From Insert Mode, delete
1) back one character (backspace
(2) back one word
(3) back to start of line
(1)
(2)
(3)
From Insert Mode, paste text from register X
X
Hence, to paste from register zero, 0