Difficulty: Easy
Correct Answer: s
Explanation:
Introduction / Context:
Efficient editing in vi/Vim relies on powerful single-keystroke commands. Knowing the difference between change, substitute, append, and insert is key to rapid text manipulation. Here, we focus on replacing exactly one character and then continuing to type new text seamlessly.
Given Data / Assumptions:
Concept / Approach:
The command s (substitute) deletes the character under the cursor and puts you into insert mode. You can then type any amount of text. By contrast, r replaces only one character and remains in normal mode; S substitutes the entire line; a appends after the cursor; i inserts before the cursor.
Step-by-Step Solution:
Verification / Alternative check:
Compare s vs r: rx changes one character to x and stops; s deletes the character and keeps you inserting, which matches the requirement.
Why Other Options Are Wrong:
b: S substitutes the whole line, not a single character.
c: a appends after the cursor; it does not remove the original character.
d: i inserts before the cursor; the original character remains unless you delete it manually.
e: Not applicable because s is correct.
Common Pitfalls:
Using r instead of s when multiple characters are needed; forgetting to press Esc to leave insert mode; confusing S with s, which affects a vastly different scope.
Final Answer:
s
Discussion & Comments