-
Notifications
You must be signed in to change notification settings - Fork 180
Not working in erb files #83
Comments
👍 |
Got the same behavior in handlebars ( |
You can use ⌘E to expand abbreviations anywhere: https://github.com/emmetio/emmet-atom#default-keybindings |
Is there a reason why syntax detection is based on grammar, not on scope? That should allow it to work in anything that resembles HTML. |
You may want to use default snippets in HTML scope of ERB-files to create ERB-structs like |
Ah, I see. Do you know how this problem is solved e.g. in the sublime plugin? Do they have expansion priorities or sth? |
In ST it’s impossible to properly solve this issue (e.g. make distinction between static built-in snippets and dynamic Emmet abbreviations) due to lack of API. But it quite possible in Atom due to its open-source nature: it’s possible to contribute some API points to default Atom’s snippets package to retrieve all matched snippets for given scope |
Sounds neat. Is this something that is being worked on, or should I have a look? |
No, I’m not working on it |
thanks, |
The shortcut seems to be Edit: Ahh, of course. Nothing has changed. |
I'd really like tab expansion in handlebars files. |
From v2.3.0 you can easily enable the Tab key for any language. Read this for more info. |
Thanks @silvenon 👍 Works! File -> Open Your Keymap 'atom-text-editor[data-grammar="text html mustache"]:not([mini])':
'tab': 'emmet:expand-abbreviation-with-tab' |
@silvenon @brunowego Thank you, exactly what I was looking for! |
add this to keymap.cson
data-grammar for erb is
|
I just can not find the |
ST2 as in Sublime Text 2? This is an Atom plugin 😁 |
I'm a ST3 user and I'm trying to enable erb snippets within Emmet as well @weekeight. I'm not so hopeful after seeing @sergeche's post haha |
@adeyahya I show the data-grammar as |
Try with this: It's working for me. 'atom-text-editor[data-grammar="text erb basic"]:not([mini])': |
my keymap.cson is: 'atom-text-editor[data-grammar="text html basic"]:not([mini]), atom-text-editor[data-grammar~="text erb basic"]:not([mini])': |
This one works for me (Atom 1.14.2):
|
@brunowego's comment should be in the docs. |
Tab expansion doesn't work in ERB files. I had this working through #43 some time ago, but since then the code got replaced and I don't know what's going on now.
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/2215723-not-working-in-erb-files?utm_campaign=plugin&utm_content=tracker%2F535900&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F535900&utm_medium=issues&utm_source=github).The text was updated successfully, but these errors were encountered: