VSCodeVim / Vim

:star: Vim for Visual Studio Code
http://aka.ms/vscodevim
MIT License
13.57k stars 1.3k forks source link

add a textobject:SelectAttrs i-r/a-r #9037

Open HenryTSZ opened 2 months ago

HenryTSZ commented 2 months ago

What this PR does / why we need it:

Currently, the VSCodeVim does not have a feature for quickly selecting HTML attributes, so I went ahead and developed one myself.

Usage: Place your cursor on the attribute you wish to select, then use the commands i-r to select the inner attribute or a-r to select the entire attribute, like cir / dar / vir

Which issue(s) this PR fixes

no

Special notes for your reviewer:

  1. I haven't written any test cases for it, but I've manually tested the functionality and found it to be working well.
  2. Currently, I'm using the keybinding r, and I'm unsure if this mapping is universally acceptable or might conflict with other Vim functionalities.