Difficulty: Easy
Correct Answer: x
Explanation:
Introduction / Context:
Mastering vi/Vim involves knowing concise Normal-mode commands for quick edits. Deleting a single character without entering Insert mode is a frequent operation when fixing typos or cleaning code, and there is a dedicated key for it.
Given Data / Assumptions:
Concept / Approach:
The 'x' command deletes the character under the cursor. It can be prefixed by a count to delete multiple characters (for example, '3x' deletes three characters). Related commands include 'X' to delete the character to the left and 's' to substitute the character by entering Insert mode after deletion.
Step-by-Step Solution:
Verification / Alternative check:
Undo with 'u' to confirm exactly one character was affected. Compare with 'dl' (delete right), which achieves a similar effect; both operate at character granularity but 'x' is the canonical shortcut.
Why Other Options Are Wrong:
Common Pitfalls:
Remaining in Insert mode and pressing 'x' results in literal typing of 'x'. Always ensure Normal mode before issuing motion/edit commands.
Final Answer:
x
Discussion & Comments