How do I listen for when a snippet is selected?


I am brand new to Atom Package development, and would like to run code on the event that a snippet is chosen.

I saw that there’s an event “snippets:expand”, but I have no idea how to listen for it, or where I would place the listener in my code.

Any help would be greatly appreciated, thanks.


snippets:expand isn’t an event. It’s a command that tells the snippets package what to do. I haven’t looked at that package’s code, but I don’t know of any event that could be listened to.


bump. Any help anyone?


If you would like to have an event fired on snippet expansion, you should submit a feature request or pull request to the snippets repo.