Extra tag when applying tag in Vim surround commands
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
When I select and apply HTML tag it adds an extra closing tag to the opening tag or it doesn't close opening tag properly
To Reproduce
Steps to reproduce the behavior:
Case 1
- Select some text visually or the whole line by
yss, press S and apply a tag - outcome is `selected text
Case 2:
- Select some text visually or line by
yssand enter the tag but instead of closing tag press Enter - outcome is: `<tagSelected text
Expected behavior
It should normally surround the selected text with a HTML tag
Screenshots

Environment (please complete the following information):
- Extension (VsCodeVim) version: 1.17.1
- VSCode version: 1.50.1
- OS: Windows 10 build 20246.re_release.201024-2009
Additional context
Add any other context about the problem here.
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 in VSCodeVim using the visual selection or yss flow, then apply an HTML tag and compare the S and Enter cases. Trace the surround-command handling for tag input; done means selected text is enclosed by exactly one properly formed opening and closing tag.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100