John has opened a text file named data.txt in the vi editor. He moves the cursor using the arrow keys to a position in the file where he needs to make several changes. However, when he tries to enter text nothing happens. Which of the following could be stopping John from entering text?
  1. The vi editor is in insert mode. He needs to switch to command mode.
  2. The vi editor is in insert mode. He needs to switch to replace mode.
  3. The vi editor is in command mode. He needs to switch to insert mode.
  4. The text file is corrupt.
Explanation
Answer - C - The vi editor is in command mode. John needs to switch to insert mode. This could be stopping John from entering text in the file.

Key Takeaway: The vi editor starts out in command mode. To enter insert mode, you can press I, Insert, or the S key on the keyboard. After pressing one of these keys you can edit the text of the file. The- INSERT- text displayed at the bottom of the vi interface specifies if you are in the insert mode.
Was this helpful? Upvote!
Login to contribute your own answer or details

Top questions

Related questions

Most popular on PracticeQuiz