VSCodeVim / VSCodeVim/Vim

Pasting with `p` creates extra closing tag when `html.autoClosingTags` is on

Open
#3,880 0 comments 1 reaction 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
See title. Similar to #2801

To Reproduce
Steps to reproduce the behavior:

  1. Open any html file. Make sure html.autoClosingTags is on.
  2. 'yy' on a line with only an opening tag.
  3. Hit 'p'.

Expected behavior
The line is duplicated.

Actual behavior
An extra closing tag is inserted.

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 1.8.1
  • VSCode version: 1.36.0
  • OS: MacOS 10.14.5

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

Reproduce this in an HTML file with html.autoClosingTags enabled: yank a line containing only an opening tag with yy, then paste with p. Compare the result with the expected duplicated line and verify that no extra closing tag is inserted; inspect the paste and HTML auto-closing behavior in the VSCodeVim extension.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.