Difficulty: Easy
Correct Answer: ic
Explanation:
Introduction / Context:
The classic vi editor (and its enhanced variants like Vim) supports numerous runtime options toggled via the :set command. One common usability tweak is making searches case-insensitive, so a single pattern can match both uppercase and lowercase text without extra regex tokens.
Given Data / Assumptions:
Concept / Approach:
In vi/Vim, configuration options have short names. For search behavior, 'ic' stands for 'ignorecase', which makes the search engine treat uppercase and lowercase letters as equivalent. Other listed options control unrelated features like indentation, parenthesis matching, or tab width.
Step-by-Step Solution:
Verification / Alternative check:
In Vim, :help ignorecase documents that 'ic' makes all searches case-insensitive unless 'smartcase' is also set and the pattern contains uppercase letters. Running :set ic? shows the current state. This confirms that 'ic' is the appropriate setting.
Why Other Options Are Wrong:
Common Pitfalls:
Confusing 'ignorecase' (ic) with 'smartcase' (scs). Smartcase refines behavior when uppercase appears in the pattern, but the base switch to ignore case globally is 'ic'. Another pitfall is setting 'ic' and expecting it to affect substitute flags; remember that substitute is driven by the same search engine but can also be influenced by flags like 'c' for confirm.
Final Answer:
ic
Discussion & Comments