VSCodeVim / VSCodeVim/Vim

vim-surround and problem with 'html.autoClosingTags"

Open
#2,801 9 comments 11 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

Is this a BUG REPORT or FEATURE REQUEST? (choose one):

BUG REPORT

What happened:

With vim-surround feature. If i do use tag, it seem working wrong. Like:

<tag></tag>Hello</tag>

Maybe because "html.autoClosingTags" setting, if i set it to false, everything working fine, but without html auto closing tag is painful 😢

What did you expect to happen:

vim-surround feature should overwrite default auto closing tags feature of vscode.

How to reproduce it (as minimally and precisely as possible):

Like we have:

<div>
  hello
</div>

Firstly, ensure that "html.autoClosingTags" is "true" in setting.

Choose hello with visual mode, then type:

shift s < b >

I'll become:

<div>
  <b></b>hello</b>
</div>

Environment:

  • Extension (VsCodeVim) version: 0.14.1
  • VSCode version: 1.24.1
  • OS version: OSX High Sierra 10.13.4 & Ubuntu 18.04

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

The issue names no source files or tests. First reproduce the visual-mode vim-surround action in VS Code with html.autoClosingTags enabled, then trace the extension's surround handling and its interaction with HTML auto-closing. Done means surrounding hello with produces one matching closing tag rather than a duplicate.

Written by the indexing model from the issue text.

Assessment

Tech stack
html, 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.