emmetio / sublime-text-plugin

The essential toolkit for web-developers
https://emmet.io
MIT License
253 stars 29 forks source link

Auto-insert `.class` false positive #183

Open rchl opened 1 year ago

rchl commented 1 year ago

Pressing . to auto-insert .class is amazing when it works but there exist various cases where it misfires and prevents from inserting proper code.

For example:

https://github.com/emmetio/sublime-text-plugin/assets/153197/2c89596c-893f-4ba4-8751-f615db137d77

Scopes.

Screenshot 2023-05-15 at 13 35 27

It also appears that it's not possible for the user to override this key binding because if I add -punctuation.separator to the context then my custom binding won't trigger but the original one still will. I suppose a workaround might be to disable emmet_auto_id_class and then use custom key binding.

sergeche commented 1 year ago

OK, thanks, will try to find a solution. I guess it’s save to assume that a dot must be preceded with space character

rchl commented 1 year ago

Except in this case maybe: <div|>