Vim Flashcards
What are the different ways to get into insert mode?
i = insert text before the cursor
I = insert at start of line before first non-blank
a = append text after cursor
A = append text at end of the line
o = begin a new line below the cursor and insert txt
O = same but above
What are different ways to delete characters or lines?
dd = delete a line
D = delete rest of line
x = delete a character
r = replace a character
What are different ways to search for characters/segments?
/ = search forward
? = search backward
*n = look at next result
N = previous result
How can you copy?
yy or Y = copy
p = paste before cursor
P = paste before cursor
*whole line
what are the following commands?
:w, :q, :wq, :q!, :number, :e
:w = save file
:q = quite current window
:wq = save and quit
:q! = quit and discard changes
:number = go to specific line number
:e filename = edit a file