101-500 practice question 9 of 30

Which of the following are modes of the vi editor? (Choose two.)

Full set: 246 questions
Answer options
A: edit mode
B: insert mode Correct answer
C: change mode
D: review mode
E: command mode Correct answer
Correct Answer:
B. insert mode; E. command mode
Explanation

The vi editor is modal, meaning the effect of keystrokes depends on the current mode. The two primary modes are Command mode and Insert mode. In Command mode (the default), keys are interpreted as commands for navigation, deletion, copying, etc. In Insert mode, entered by pressing keys like i or a, typed characters are inserted into the file as text. Users switch between these modes to edit efficiently.

Why Incorrect

A. edit mode: This is a generic term; "Insert mode" is the specific, correct name for the text entry mode in vi.
C. change mode: This is not a distinct mode. Commands like c (change) place the user into Insert mode after deleting text.
D. review mode: This is not a standard mode in the vi editor.

References

1. Robbins, A., Hannah, E., & Lamb, L. (2008). Learning the vi and Vim Editors. O'Reilly Media. Chapter 1, "Basic and Advanced vi," introduces the concept of modes, focusing on Command Mode and Insert Mode as fundamental.

2. University of Washington, "Basic vi Commands". This university resource clearly defines the two basic operating modes: "Command Mode" and "Insert Mode," explaining how to switch between them.

3. The Open Group Base Specifications Issue 7, 2018 edition, vi utility. Section "vi Command Descriptions" implicitly describes the behavior of command mode and the commands (a, i, o, etc.) that enter insert mode.

Scroll to Top