All Flashcards
(209 cards)
What is the primary mode in Vim for inserting text?
Insert mode
Which key is used to enter Normal mode from Insert mode?
Esc
In Normal mode, what does the ‘h’ key do?
Moves the cursor left
In Normal mode, what does the ‘j’ key do?
Moves the cursor down
In Normal mode, what does the ‘k’ key do?
Moves the cursor up
In Normal mode, what does the ‘l’ key do?
Moves the cursor right
What command is used to delete a line in Normal mode?
dd
True or False: The ‘x’ command deletes the character under the cursor.
True
What command is used to copy a line in Normal mode?
yy
What is the command to paste copied text in Normal mode?
p
Which command in Normal mode moves the cursor to the beginning of the line?
0
Which command in Normal mode moves the cursor to the end of the line?
$
What does ‘w’ do in Normal mode?
Moves the cursor forward to the beginning of the next word
What does ‘b’ do in Normal mode?
Moves the cursor backward to the beginning of the previous word
How do you switch from Normal mode to Visual mode?
Press ‘v’
What does ‘gg’ do in Normal mode?
Moves the cursor to the top of the file
What does ‘G’ do in Normal mode?
Moves the cursor to the bottom of the file
What is the command to undo the last change in Normal mode?
u
What is the command to redo the last undone change?
Ctrl + r
True or False: In Visual mode, you can select text using the arrow keys.
True
Which command is used to search for a string in Vim?
/
What does the command ‘:set number’ do?
Displays line numbers
What command is used to save changes and exit Vim?
:wq
How do you delete the word under the cursor in Normal mode?
dw