CECS 325 Final- Questions with 100% Correct
Answers
What key is used to enter insert mode in Vim?
•i
•m
•r
•t
i
How can you save changes to a file and exit Vim?
• :exit
• :wq
• :write&exit
• :save&quit
:wq
What does the u key do in normal mode?
• Moves the cursor to the end of line
• Undoes the last change
• Deletes the current line
• Copies the current line
,Undoes the last change
How do you search forward for a specific word in Vim?
• #word
• ?word
• /word
• &word
/word
Which command is used to copy the current line in normal mode?
• pp
• cc
• yy
• dd
yy
How can you move the cursor to the beginning of the current line?
•0
•G
•H
•$
0
, What does the command :q! do?
• Exits without saving changes
• Saves changes and exits
• Quit Vim with confirmation
• The correct answer is not listed
Exits without saving changes
Which mode allows you to navigate and manipulate highlighted text?
• Insert mode
• Command mode
• Replace mode
• Visual mode
Visual mode
What does the :help command do?
• Displays a help message
• Creates a new Vim session
• Opens a file for editing
• Opens a new empty buffer
Displays a help message
Answers
What key is used to enter insert mode in Vim?
•i
•m
•r
•t
i
How can you save changes to a file and exit Vim?
• :exit
• :wq
• :write&exit
• :save&quit
:wq
What does the u key do in normal mode?
• Moves the cursor to the end of line
• Undoes the last change
• Deletes the current line
• Copies the current line
,Undoes the last change
How do you search forward for a specific word in Vim?
• #word
• ?word
• /word
• &word
/word
Which command is used to copy the current line in normal mode?
• pp
• cc
• yy
• dd
yy
How can you move the cursor to the beginning of the current line?
•0
•G
•H
•$
0
, What does the command :q! do?
• Exits without saving changes
• Saves changes and exits
• Quit Vim with confirmation
• The correct answer is not listed
Exits without saving changes
Which mode allows you to navigate and manipulate highlighted text?
• Insert mode
• Command mode
• Replace mode
• Visual mode
Visual mode
What does the :help command do?
• Displays a help message
• Creates a new Vim session
• Opens a file for editing
• Opens a new empty buffer
Displays a help message