Commands to Know Flashcards
1
Q
Copying Text
A
3 Step Process: 1) use y, yy or Y commands to copy text : yw = copy 1 word y10w = copy 10 words y2) = copy 2 sentences y5} = copy 5 paragraphs yy = copy 1 line 10yy = copy 10 lines
2) Move to line where you want to pass
3) use the p command to paste
2
Q
Deleting Text
A
x = delete character at curser X = delete character to left of cursor D = delete from cursor to end of line dmove = delete from curse to move dd = delete the entire current line
3
Q
Cutting / Moving Text
A
dw comman = deletes the word the cursor is at (the word also gets stored in a storage area called the UNNAMED BUFFER)
p command = inserts the contents of the unnamed buffer after the current position of the cursor
4
Q
Quitting without saving
Save and quit
A
- :q!
- ZZ
5
Q
Open Vi in Read Only mode
A
vi -R