Are you a Vim enthusiast? Put your knowledge to the test with our Mastering Vim Commands Quiz! Discover how many correct answers you can get out of 10 and prove your command line prowess.
1. Which command in Vim lets you save changes and quit the editor simultaneously?
:q!
:w
:wq
:x
2. How do you jump to the start of a file in Vim?
gg
G
gg / 1G
23G
3. What is the command to undo the last action in Vim?
Ctrl-r
u
dd
yy
4. Which command moves the cursor to the end of the current line in Vim?
0
$
^
G
5. How do you delete a word backward from the cursor position in Vim?
dw
b
db
dh
6. To enter insert mode at the cursor position, which command would you use?
ESC
r
i
v
7. How can you search for a word in Vim?
:find [word]
:sch [word]
/[word]
?[word]
8. What command copies the current line in Vim?
dd
y
yy
yw
9. How do you display line numbers in a Vim session?
:set number
:show numbers
:line numbers on
:set nu
10. Which command allows you to replace a single character at the cursor position in Vim?