Comments (6)
From @dimkir on September 12, 2017 11:38
The "inner" </p>
is added by autoclose..
from vscode-htmltagwrap.
From @bennyschaefer on September 22, 2017 11:8
htmltagwrap hasn't seen an update in about a year. I doubt we'll see a fix for this. But I did some testing and came up with this solution that works:
VSCode can do htmltagwrap without the extension. Here's how:
- Disable or remove the htmltagwrap extension
- File > Preferences > Keyboard Shortcuts
- Search for 'emmet wrap'
- Set Keybinding for 'Wrap Individual Lines with Abbreviation' to Alt + W (or whatever you desire)
There you go. The only difference is that you get to enter the desired tag instead of automatically getting a p-tag.
PS: I know this doesn't really contribute to a bugfix, but since there hasn't been any work on this extension in a while, and I really grew fond of its functionality (as did others), I felt comfortable sharing this workaround here in case anyone else misses the ease of adding tags to a selection.
PPS: I'm aware this kinda misuses the emmet wrap feature, but it still works. Definitely better than having to remove an auto-closed tag each time.
from vscode-htmltagwrap.
This bug is the result of a breaking change from the autoclose feature discussed in microsoft/vscode#2246 (comment). I'm looking into fixing this (and also on accepting the pull requests that have been sitting here for a while). Apologies for the neglect to this extension. I want to fix it up and deliver on the top requests. Thanks for your patience!
from vscode-htmltagwrap.
In the meantime, a workaround is using the setting
"html.autoClosingTags": false
which will prevent the duplicate tag.
from vscode-htmltagwrap.
From @dreadsoul on October 3, 2017 13:13
I have also the same problem and think the following details will be useful:
1. if I do select a word then i get: <p></p>Lorem.</p>
2. if i do just Alt+W i have: </p><p>
Note: If I select more then 1 line the problem does not occur!
from vscode-htmltagwrap.
@GitLiamuk this should be fixed now. It was an issue with an emmet feature that was enabled by default in a recent VS Code release. I've updated the way htmltagwrap does its thing so that it doesn't trigger emmet to do duplicate work.
from vscode-htmltagwrap.
Related Issues (20)
- Doesn't work on Mac version 1.25 HOT 1
- Closing Tag Cursor jumps to after >tag
- Doesn't work for me on High Sierra HOT 1
- Closing tag error when selection ends on blank line
- Pasting html tag content error
- Extension issue HOT 2
- Feature Request: Shift+Alt+W Wraps with new lines
- Deleting 2nd Part of selection after wrap HOT 4
- anchor around email HOT 2
- Extension issue
- Is this part of any other extension? HOT 1
- tag with attribute
- Please add Emmet support [Feature Request] HOT 1
- VSCodium support HOT 1
- Alt W doesn't work HOT 1
- pressing space with autoDeselectClosingTag removes part of the tag HOT 14
- Glyph area HOT 1
- Automate vsce publish to also publish to open-vsx marketplace
- Verify custom tags donβt break spacebar press HOT 2
- command 'extension.htmlTagWrap' not found HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-htmltagwrap.