VI commands Flashcards
1
Q
:set nu
A
gives line number
2
Q
:1.14 co 5
A
copies line 1-14 at line number 5
3
Q
o
A
inserts a line
4
Q
G
A
last line of the file
5
Q
dd or (ndd, dw, dnw, d, db, D)
A
removes a line (delete n lines) delete word
6
Q
x
A
removes a character
7
Q
:g/word to replace/s/word to replace /new word/g
A
global replace of a word
8
Q
p and P
A
Put general buffer after (before) cursor
9
Q
yy or Y
A
Yank (copy) line to general buffer
10
Q
“z6yy
A
Yank 6 lines to buffer z
11
Q
yw
A
Yank work to general buffer
12
Q
“a9dd
A
Delete 9 lines to buffer a
13
Q
“A9dd
A
Delete 9 lines: Append to buffer a
14
Q
“ap
A
Put text from buffer a after cursor
15
Q
J
A
Join lines
16
Q
a
A
append after cursor
17
Q
i
A
insert before cursor