Reputation: 8702
It seems Emmet is supposed to work with .jsx files too, but I cant get it to work in atom. My divs are not expanding, nothing happens when i press tab. I've tried restarting Atom, disabled all other user packages and it works perfectly with html documents. Should Emmet work with .jsx out of the box or are there configurations needed?
Upvotes: 16
Views: 6988
Reputation: 329
Open Atom -> Preferences -> Packages -> Emmet
Scroll down a bit and you'll see a note about this particular issue. From there you just need to grab the correct context, which in my case was source js jsx and add it to your Keymap configuration.
# Auto expanding for emmet @
'atom-text-editor[data-grammar="source js jsx"]':
'tab': 'emmet:expand-abbreviation-with-tab'
OR (with a more relaxed selector)
# Auto expanding for emmet @
'atom-text-editor[data-grammar*="js"].not:[mini]':
'tab': 'emmet:expand-abbreviation-with-tab'
Upvotes: 22
Reputation: 651
As of the latest version you can hit cmd + shift + e. I assume for windows or linux it would be ctrl + shift + e (Although I have not verified windows and linux one)
Upvotes: 16