VSCodeVim / VSCodeVim/Vim

Extra tag when applying tag in Vim surround commands

Open
#5,563 9 comments 6 reactions 0 assignees View on GitHub

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

  1. Select some text visually or the whole line by yss, press S and apply a tag
  2. outcome is `selected text

Case 2:

  1. Select some text visually or line by yss and enter the tag but instead of closing tag press Enter
  2. outcome is: `<tagSelected text

Expected behavior
It should normally surround the selected text with a HTML tag

Screenshots

image

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.