Multiple choice technology programming languages

How to convert lower case to upper case or vice versa in vi

  1. :set upper/lower on

  2. Use ~

  3. :/s lower to upper

  4. None

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The tilde (~) key in vi toggles the case of the character under the cursor - if it's lowercase it becomes uppercase, and vice versa. Options A and C reference non-existent vi commands. This is a quick way to change case without entering insert mode.