HTML tag selection doesn't work expected
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
Describe the bug
Selecting inside HTML tag chooses portion of the tag itself if the tag is split over multiple lines.
To Reproduce
-
Have a
hello.htmlfile with contents (including line breaks):<p> foo</p> -
Move cursor to
fcharacter. Use vim key combinationvit(visual select inside tag) -
Observe that visual highlighted text includes the
>portion of<p>.
Expected behavior
> portion of the opening tag <p> should not be selected.
Original Vim does not select that character.
Screenshots

Environment (please complete the following information):
- Extension (VsCodeVim) version: v1.21.10
- VSCode version: 1.63.2
- OS: macOS Monterey
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the described hello.html contents and the Vim vit command, then compare the selection with original Vim. Trace the HTML tag-selection behavior from that reproduction and verify that the closing > of the opening tag is excluded when the tag spans lines.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100