Using VIM Flashcards
What vim command will substitute all occurances of an old value with a new one?
:%s/old/new/g
What does the :%s/old/new/g command do?
The command will substitute all occurances of an old value with a new one.
What vim command will go to the top of the document?
gg
What does the gg command do?
The gg command will go to the top of the document.
What vim command will go to the end of the document?
G
What does the G command do?
The G command will go to the end of the document.
How do you search forward through a document?
/string
Followed by n
How do you search backwards through a document?
?string
How do you modify a file in vim?
The i and a commands enter input mode
* i - insert
* a - append
What happens when i or a is pressed in command mode?
vim will enter input mode
What vim command is used to delete the current line?
dd
What is the dd command used for?
The dd command is used to delete the current line.
What vim command is used to copy (yank) the current line?
yy
What is the yy command used for?
The yy command is used to copy (yank) the current line.
What vim command is used to past the test currently in the buffer?
p