ES2015 arrow functions support
Closed this issue · 8 comments
Any chance to support arrow functions () => {}
in the snippets?
That would be cool, I just don't know which tabTrigger
to use.
For example, to trigger afterEach(function() { ... })
you do: ae ⇥
, so what can we use for the ES2015 counterpart?
I don't have any experience in writing Sublime packages, but wouldn't it be possible to use user settings? Just like:
{
"standard": "es2015"
}
and conditionals in the templates / separate template files ?
Sadly Sublime does not have that option for snippets (to my knowledge at least). The way you define a new snippet is placing the file with the right extension on a folder so the editor knows it exist. That means that there's so there is no pre parsing to place a SublimeSetting.
This package provides both double and single quote snippets by changing the extension of every snippet of one type to snippetx
and keeping the other kind with the correct extension. Maybe I can use the same trick (hack) for ES2015
Okay, then you can try with that. At least it's some kind of a solution.
Ok I agree. I'll give it a try as soon as I can and I'll let you know here !
Thanks!
Well this is up! (version 4.2.0
)
Midway implementing what I said Sublime started misbehaving so instead of fighting it, I ended up just adding the snippets like you suggested at first 😄
I'm closing this for now but If you have any problems (or find any missing snippets) let me know !
Thanks (:
@nicosantangelo thanks a lot! That works good for me 😄