Emmet not working, shows butt

I want to create a button, I type part of the tag name, hit Tab, and it creates a tag with part of the name:

Also if I type `button` then hit Tab, it creates the tag but without any attributes (like `name` would be good):

<button></button>

Am I misunderstanding Emmet? Does it only create tags from Tab after I type the full name of the tag?

I suppose a `<butt>` tag may be useful at the end of a section or something... but it just looks funny.

0
2 comments

It works as expected: Emmet is not about tags completion, it's about abbreviations. It doesn't have a set of predefined tag names. If you enter the certain string that doesn't match any of known abbreviations and hit Tab, the entered word will be transformed into a tag. See https://docs.emmet.io/abbreviations/syntax/#elements

To create a button with certain name, enter

btn[name=foo]

To create a certain button type, try thr predefined abbreviations, for example,

btn:b

creates

<button type='button'></button>
2

I can't believe nobody's made a construction worker joke about this yet.

1

Please sign in to leave a comment.