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

Improve HTML writing experience with Emmet #221548

Open
anthonyvdotbe opened this issue Jul 12, 2024 · 0 comments
Open

Improve HTML writing experience with Emmet #221548

anthonyvdotbe opened this issue Jul 12, 2024 · 0 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug confirmed Issue has been confirmed by VS Code Team member emmet Emmet related issues
Milestone

Comments

@anthonyvdotbe
Copy link

anthonyvdotbe commented Jul 12, 2024

There are Emmet abbreviations for:

  • a single dot
  • common English words, such as is, apple, key
    (Note that all of these are obsolete, as they are abbreviations for HTML that has been removed from the specification: isindex, applet, keygen)
  • common Dutch words, such as op
    (op is the abbreviation for option, which is only permitted inside certain parents (select, optgroup, datalist), so if I'm just typing plain text outside any of those parents (which are barely ever used when writing plain text), it should be easy enough for VS Code to figure out that I just want the word op)
  • the letter c to insert a comment, but VS Code has Ctrl + / for this already
  • CC (as in carbon copy), again: for something that is obsolete in 2024
  • e.g. being expanded to <e class="g"></e>
  • slash for self-closing elements (though I don't see the added value & this isn't even mentioned on the cheat sheet), which is annoying, because I regularly write a list of alternative/interchangeable terms as foo/bar/baz
  • ?! at the end of a sentence resulting in the exclamation mark being expanded to a whole template HTML document (again, the only time you'd likely ever want to have that particular expansion, is when your file is still empty)
  • ...

This makes for a frustrating UX when you're simply trying to write text in HTML.

The single dot issue was already reported as #87985, but closed as "as designed". While I agree it isn't a bug, it is very frustrating and providing a solution for it is a worthwhile enhancement (all the more because it's natural to start a new line at the end of a sentence, and thus pressing enter after typing a dot).

I've already reported the other examples as emmetio/emmet#728, but Emmet seems unmaintained.

So the feature request is: provide a way to configure VS Code such that typing any of ., is, apple, key, op followed by Enter does not expand as an Emmet abbreviation. One possible way would be to provide a way to override built-in snippets with a custom snippets.json (as the OP attempted in #87985). Another would be to provide a boolean setting emmet.disableCommonAbbreviations and simply override those abbreviations in VS Code proper.

@rzhao271 rzhao271 added emmet Emmet related issues under-discussion Issue is under discussion for relevance, priority, approach labels Jul 13, 2024
@rzhao271 rzhao271 added confirmed Issue has been confirmed by VS Code Team member bug Issue identified by VS Code Team member as probable bug and removed under-discussion Issue is under discussion for relevance, priority, approach labels Oct 14, 2024
@rzhao271 rzhao271 added this to the Backlog milestone Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug confirmed Issue has been confirmed by VS Code Team member emmet Emmet related issues
Projects
None yet
Development

No branches or pull requests

2 participants