-
Notifications
You must be signed in to change notification settings - Fork 29.1k
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: Unknown abbreviations no longer get expanded in suggestion list #31003
Comments
Some more bad examples:
etc. |
First off, in the new emmet model In the new model, either the user can bind a new keybinding to the Now coming to the issue at hand. The below is from the Emmet Cheatsheet and is the case you are referring to What we noticed when providing the above case in the suggestion list is that everything you type can now be considered an "unknown abbreviation" and will be attempted to expand which becomes severe noise when you are typing simple text and try to hit tab or enter to get indentation or a newline respectively. This is discussed in #30265 As a solution that, I am trying out not providing All abbreviations and snippets will continue to work as before and will appear in the suggestion list. I agree that this will take some unlearning to do, but emmet is so much more than just If you have any other ideas to get around the noise issue in #30265, I am all ears 👂 And thanks for providing feedback. I have observed you have been chiming in, in other emmet issues as well. I really appreciate all the feedback I am getting. 👏 |
Thank you for the detailed explanation, now I better understand the dilemma. Indeed, depending on the context a user could expect different results by performing exactly the same actions. When I type Actually, I like that Emmet is less intrusive now and it doesn't expand everything. Typing As a simple solution to 90% of problems, can I suggest to make Emmet "know" the most important abbreviations that we use every day hundreds of times? Like It is very weird when I type |
This has been fixed in the latest Insiders.
Exactly!
Yes because the logic I have identifies it as a possible abbreviation since it is not just letters.
We could have a whitelist, but as HTML specifications change, this will be hard to maintain. But its a good place to start nevertheless. cc @niichie, @smlombardi from #30265 for their thoughts |
Yeah, but covering the most important tags would handle 95% of the cases with 5% of effort, I think. Here's my list of must haves:
|
@vvs My current solution to expanding the common html tags is to use the HTML Snippets plugin, as is handles pretty much all of that for me without having to touch any emmet settings. I can understand not wanting to do this however. By doing so it allows certain abbreviations like One thing I will say it is very strange that Weirdly enough this isn't happening once I have a boilerplate down? And here are some more examples of strange emmet behavior that I could reproduce from @vvs example
Once again not happening in the body of a boilerplate.
I think there is definitely some inconsistency at the moment. For example I think adding some basic abbreviations like
would be useful since most people won't be typing those words in common text anyways so emmet would not intrude in most cases. |
@niichie I can confirm that the suggestions are being different depending on the place in the HTML file! When inside the
When outside the
|
Thanks for testing @vvs and @niichie !
Fixed with microsoft/vscode-emmet-helper@781bf99 I really ought to write test cases for this helper module before the next release is out ...
Fixed with microsoft/vscode-emmet-helper@d230b55
Good point. Fixed with microsoft/vscode-emmet-helper@772bca6 |
So in html, there are 2 kinds of emmet auto-completions that will be shown That's why you see You can turn this off by setting I wonder if this feature is causing more harm than help. Thoughts? |
See emmetio/atom-plugin#27 for |
Oddly enough, select+ is working for me in atom with emmet-simplified. |
Am not sure what you mean by "emmet-simplified" In the new emmet plugin for atom that @sergeche is working on, you will see that it doesnt work |
@ramya-rao-a Excellent updates, thank you very much! I noticed one problem with the following though:
Some of the tags are not being expanded, even though they are listed in the source. For example: I added console.log into the emmetHelper.js, and I see that So, when I start typing s, sp, spa, span, I see that the method is invoked for s, sp, spa, but not for For This seems to be depending on the existence of the span elements in the document. P.S. Without regression tests this would drive you crazy sooner or later though! :) |
@niichie you’re using old Atom plugin, the new is here: https://github.com/emmetio/atom-plugin |
@sergeche Ah, thank you! |
@vvs Are you running VS Code from source? |
@ramya-rao-a Yes, I just did:
And I am getting pretty pointless (but funny) suggestion when I type To get the Emmet suggestion ( |
well, thats just plain ridiculous :) Is the problem only with span? How about other white listed tags in microsoft/vscode-emmet-helper@d230b55? |
@ramya-rao-a I tested this on the freshly updated Insiders. Here's my file:
So far, the following commonly used tags, listed in microsoft/vscode-emmet-helper@d230b55, are not working:
|
@vvs I had Take the case of
Solution: Provide Fixed with microsoft/vscode-emmet-helper@600b5dc (Phew!) |
Steps to Reproduce:
div
and then TAB. The result: incident-detail-viewspan
and then TAB. The result: nothing happens (space is added).The text was updated successfully, but these errors were encountered: