Quote Text Objects in Vim

Use quote text objects to target inside or around quoted text. They are ideal for changing or deleting quoted content cleanly.

Commands you practise

i"
Targets everything inside the double quotes, from anywhere within them. Pair it with d to clear the string's contents in one stroke — no cursor aiming needed.
a"
Operate on a double-quoted string and the quotes themselves. Combine with d to wipe out quoted text, quotes included!
i'
Selects everything inside single quotes. Pair it with d to slice out the quoted text without touching the quotes themselves.
a'
Target a single-quoted string including the quotes themselves. Instantly delete or change quoted text without precision aiming.

Levels

  1. Empty Threat (easy): Empty the values inside the double quotes for both temporary tokens.
  2. Single Out, Double Down (medium): Clear both configuration values and completely remove the print argument.
  3. Silence of the Logs (hard): Silence both print statements by removing their string arguments entirely.

Each level opens a real Neovim session in your browser with a start file and a target file. Edit one into the other in as few keystrokes as you can, then race the vimbot's solution.

Part of VimGolf.ai Premium ($10 once, lifetime). Region: Text Objects: Basics. See the whole skill map.