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.

VS Code's built in emmet "Wrap with abbreviation" doesn't wrap with tag correctly

See original GitHub issue

First of all thank you Alexey for making this extension. Compared to VSCodeVim it’s just bliss. So fast! And supports original vim extensions!

What is wrong: Entering visual line, selecting some tags then wrapping the selection with tag using Emmet outputs some broken tags.

Repro gif GIF animation showing how emmet does not wrap tags correctly when using vscode-vim

The weird thing is that it only breaks sometimes. I had to redo the operation from the gif 3 times until it broke. Here’s it working for some reason: GIF animation showing how emmet for some reaason now wraps tags correctly using vscode-neovim

I later disabled all vscode extensions (enabled vscode-neovim obviously) and neovim plugins and checked again - emmet stilll did not wrap correctly.

VSCode info: Version: 1.41.0 […] Date: 2019-12-11T18:32:17.711Z OS: Linux x64 5.0.0-37-generic - ubuntu 18.04

vscode-neovim version: 0.0.42

Neovim info: Version: 0.4.3 Installed from AppImage

The workaround right now is to just:

  1. install vim-surround (vim extension) inside neovim
  2. select the text you want to wrap
  3. type S<div>

I’m writing this issue so it’s known. I’m not sure if the goal of this project is to integrate vscode and neovim in such a way that most features are compatible OR should everything just be delegated to neovim (such as tag wrapping)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
sethiddencommented, Dec 24, 2019

Yup. Works great now. Thanks a lot for taking the time to fix this one 😃

1reaction
asvetliakovcommented, Dec 22, 2019

Notice the position of the “virtual” cursor on last line gif

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to do tag wrapping in VS code? - html - Stack Overflow
Select text (optional) · Open command palette (usually Ctrl + Shift + P ) · Execute Emmet: Wrap with Abbreviation · Enter a...
Read more >
VS Code tips — Emmet wrap with abbreviation - YouTube
Today's VS Code command: Emmet wrap with abbreviationWrap selected text with the html from an Emmet abbreviation.
Read more >
Emmet not working in VS Code ?— Here's how you can fix this ...
Click on the Settings or press Ctrl+, to open the VS Code Settings. Step 2: Click on the Extensions tab on the left...
Read more >
Emmet in Visual Studio Code
Trim filter (t)​​ This filter is applicable only when providing abbreviations for the Emmet: Wrap with Abbreviation command. It removes line markers from...
Read more >
How to set coding preferences in Dreamweaver - Adobe Support
Selecting this option ensures that when you press Tab, Dreamweaver converts the Emmet abbreviation into full HTML or CSS code.
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