microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.55k stars 29k forks source link

Emmet 2.0: Doesn't offer suggestion when nested text provided #31916

Closed smlombardi closed 7 years ago

smlombardi commented 7 years ago
Extension Author (truncated) Version
ng-template Ang 0.1.4
code-settings-sync Sha 2.8.2
sort-lines Tyr 1.3.0
html-snippets abu 0.1.0
Bookmarks ale 0.15.2
project-manager ale 0.18.1
path-intellisense chr 1.4.2
vscode-eslint dba 1.2.11
tslint eg2 0.17.0
auto-rename-tag for 0.0.14
Angular2 joh 2.4.0
ecdc mit 0.10.3
HTMLHint mka 0.3.3
vscode-autoprefixer mrm 2.1.1
vscode-stylefmt mrm 2.5.0
angular2-inline nat 0.0.17
stylelint shi 0.28.0
change-case wma 1.0.0

(4 theme extensions excluded)


Steps to Reproduce:

  1. Type a pattern such as section#chartjs>h1{My Title} (yes, I'm an Emmet fanatic)
  2. Nothing is suggested, but if I run "expand suggestion" from the Command Palette it works as intended.

Not sure if this is an issue, per se, but since the "expand suggestion" command is mapped to tab and tab doesn't actually expand anything (you need to choose the menu item) perhaps the command should be remapped to another key-command?

smlombardi commented 7 years ago

FWIWm I mapped emmet > expand abbreviation to ctrl-e

ramya-rao-a commented 7 years ago

but... but... it works...

abbr

smlombardi commented 7 years ago

hmmm. indeed it does. that's odd. I got it to work now as well.

ramya-rao-a commented 7 years ago

:) Since you have proclaimed yourself as an Emmet fanatic, can you try out some abbreviations with grouping and nested grouping with siblings and repeaters?

I had made some upstream fixes in the past couple of days in that area and another set of eyes there would help.

smlombardi commented 7 years ago

All the grouping examples, go up examples, and sibling combos work. I'm not sure what these are even supposed to do, since the example output on the cheat sheet looks the same as ones without the @ sign to me:

ul>li.item$@-*5

ul>li.item$@3*5
ramya-rao-a commented 7 years ago

ul>li.item$@3*5 will start numbering from 3 instead of 1 This wasnt working in new emmet before. I submitted a fix upstream and it should now work.

ul>li.item$@-*5 will start numbering in descending order. This will not work in new emmet. Fixing this was not as trivial as fixing the former issue. If there is a lot of user feedback later on asking for this, then I'll take a look again

smlombardi commented 7 years ago

I have never used either in all the years I've used Emmet.