Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emmet places HTML tags around the last word when entering text in between HTML tags. #30277

Closed
niichie opened this issue Jul 8, 2017 · 1 comment
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) emmet Emmet related issues

Comments

@niichie
Copy link

niichie commented Jul 8, 2017

  • VSCode Version: 1.31.1
  • OS Version: Win 10

Steps to Reproduce:

  1. Have emmet/new emmet.
    2.Type within html tags, then press tab.

Reproduces without extensions: Yes

When trying to enter a tag quickly, say

<h1>words words words</h1>

I expect the behavior to be like:

h1 -> tab -> enter contents of h1 tag -> tab to end of tag to continue writing.

and you should get this. with the cursor at the end of the closing tag.

<h1>words words words</h1>|

Instead I get something like this with the last word wrapped in a random tag, and the cursor and the end of the newly created tags.

<h1>words words <words></words>|</h1>.

Yet if I hit space at the end of the word, so that there is nothing to put inside of tags, hitting tab goes to the end of the closing tag as I want it to.

The only plugin I have for the editor is "indent-rainbow" and my settings look like this:

"editor.tabSize": 2,
"editor.wordBasedSuggestions": false,
"workbench.colorTheme": "Atom One Dark",
"editor.rulers": [80,100],
"editor.wordWrap": "off",
"editor.cursorStyle": "line",
"editor.renderWhitespace": "all",
"emmet.useNewEmmet": true

Here is a video showing my issue. https://streamable.com/ofkbv

I have also been able to reproduce this in Atom by installing the Emmet plugin, so it must have something to do with that, but I cannot find a setting to make it only put tags around emmet shortcuts, instead of around every word when pressing tab.

@ramya-rao-a
Copy link
Contributor

Thanks for the detailed bug description, I really appreciate it :)
Let's use #30265 to track this.

@ramya-rao-a ramya-rao-a added the *duplicate Issue identified as a duplicate of another issue(s) label Jul 9, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) emmet Emmet related issues
Projects
None yet
Development

No branches or pull requests

2 participants