Tag Objects in Vim

Editing HTML, XML or JSX? it selects inside a tag pair, at selects the whole tag including its brackets.

Commands you practise

it
dit deletes everything inside the nearest HTML or XML tag pair. Perfect for clearing tag contents while leaving the outer tags intact.
at
Use dat to delete an entire HTML or XML tag along with its contents. It is the quickest way to prune elements from your markup.

Levels

  1. Hollow Header (easy): Empty the content inside the heading tag.
  2. Strip the Currency (medium): Remove the currency span tag entirely, leaving only the amount.
  3. Content Swap (hard): Move the real content into the title and remove the temporary source div.

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.