5

Is it possible to autocomplete elements that contain dots in their name? E.g., in WebStorm, if I type Grid [tab] I get <Grid></Grid>, as expected. However, if I type Grid.Column [tab], I get <Grid className="Column"></Grid>.

Is it possible to escape the ., or, by any other means get Emmet to recognize it as part of the element name instead of a className property?

bjornl
  • 1,757
  • 3
  • 17
  • 29
  • 2
    I doubt about it (that you can "escape" the dot symbol here; especially in such straight forward way). But you may create custom [Live Template](https://confluence.jetbrains.com/display/PhpStorm/Live+Templates+%28Snippets%29+in+PhpStorm) that will be expended into custom code -- that *may* do (not 100% sure, but good chance). P.S. All standard Emmet abbreviations are implemented using Live Templates .. so Live Template should have priority over dynamic Emmet expression. – LazyOne Feb 04 '18 at 11:57
  • Thanks for replying. OK. It's a shame though, I'm so used to working with Emmet that it's hard to accept that it might not be possible. – bjornl Feb 05 '18 at 13:15
  • But that's how Emmet works -- it uses `.` to denote the class. I personally do not know the syntax that would allow treating it there as part of the element itself (even in original Emmet). Have a look yourself -- maybe you will find it: https://docs.emmet.io/abbreviations/syntax/ – LazyOne Feb 05 '18 at 13:34
  • @LazyOne I did read through, was hoping there'd be some undocumented black magic I could make sure of. I just sent an email to info@emmet, let's see what they get back with. Will reply here once they do. – bjornl Feb 07 '18 at 01:48

1 Answers1

2

No.

From Sergey at Emmet (after emailing info@emmet.io):

Hi, currently, there’s no special syntax that allows dots in tag name. Although it’s possible to implement some sort of escaping, generally it’s not a good idea since it may break abbreviation extractions from text content in some cases.

bjornl
  • 1,757
  • 3
  • 17
  • 29