question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

vim-surround and problem with 'html.autoClosingTags"

See original GitHub issue

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:

<kbd>shift</kbd> <kbd>s</kbd> <kbd><</kbd> <kbd>b</kbd> <kbd>></kbd>

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

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:10
  • Comments:9

github_iconTop GitHub Comments

4reactions
vanloc101commented, Oct 12, 2020

I think it’s a bit late but I just found the solution for this issue. Just disable the built-in close tag inside VSCode and install the Auto Close Tag (by Jun Han) extension instead. The redundant tag is now gone.

4reactions
kyozcommented, Aug 26, 2018

Hi @typeoneerror, I do use kbd tag. It’s quite useful 😸

Read more comments on GitHub >

github_iconTop Results From Across the Web

vim change multiline html tags with vim-surround
I would like, using vim-surround to convert this <p> ^currsor Issues reported by users from the <a href="https://re.fr"> https://re.fr</a> ...
Read more >
VS Code Annoying Auto Closing Tags Behavior - YouTube
Is anyone else annoyed at the way that VS Code's (Visual Studio Code) Auto Closing HTML Tags behavior works? If you know of...
Read more >
Vim: Easily Add And Refactor HTML Tags With Vim Surround
I've been looking for a good way to work with tags in Vim, now most of the plugins work amazingly in html but...
Read more >
Wrapping Text in HTML Tags with Vim Macros, Vim-Surround ...
In this example we'll wrap naturally written Markdown paragraphs in HTML P tags.Hit the subscribe button to receive more videos like this!
Read more >
vim change multiline html tags with vim-surround
I experimented with it a little bit... It looks like cst<h1> using t instead of < helps, though in my case it reindents...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found