Skip to content

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

Closed

Description

@niichie
  • 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.

Activity

  1. added
    emmet
    on Jul 8, 2017
  2. ramya-rao-a commented on Jul 9, 2017

    @ramya-rao-a
    Contributor

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

  3. added
    *duplicate
    on Jul 9, 2017
  4. locked and limited conversation to collaborators on Nov 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

*duplicateemmet

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions