Surround with html tag, indentation is off
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
BUG REPORT
What happened:
For example we have:
<div>
<div class="navigation">
<div class='container'>
<a href="/" class="logo" title="Home" style="position: absolute;">
<img src="/images/logo.png">
<div class="beta-ribbon">
<div class="beta-ribbon-content">BETA</div>
</div>
</a>
</div>
</div>
I select with V
<a href="/" class="logo" title="Home" style="position: absolute;">
<img src="/images/logo.png">
<div class="beta-ribbon">
<div class="beta-ribbon-content">BETA</div>
</div>
</a>
and type S<div>
I got
<div>
<div class="navigation">
<div class='container'>
<div>
<a href="/" class="logo" title="Home" style="position: absolute;">
<img src="/images/logo.png">
<div class="beta-ribbon">
<div class="beta-ribbon-content">BETA</div>
</div>
</a>
</div>
</div>
</div>
What did you expect to happen:
I tried the same thing in native vim and I got:
<div>
<div class="navigation">
<div class='container'>
<div>
<a href="/" class="logo" title="Home" style="position: absolute;">
<img src="/images/logo.png">
<div class="beta-ribbon">
<div class="beta-ribbon-content">BETA</div>
</div>
</a>
</div>
</div>
</div>
</div>
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
Reproduce the reported Visual Studio Code Vim visual-selection workflow with an HTML snippet and compare its indentation with native Vim. Trace the surround-with-tag behavior and verify that the inserted tag and selected lines are indented one level deeper, matching the expected example.
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
- Clearly specified
- Newbie friendliness
- 35/100