Possible to import files in the snippets.cson?


I hate that all my code is in my snippets file directly, it makes my snippet file very long.

Is there any way to import files here and use the snippets.cson as a entry point?
e.g something like Sass @import or Browserify requires.
This way I could import a partial for html files, for scss and for js.

Thanks in advance


Not currently, but that’s a great idea to suggest on the snippets package :grinning:

Although, packages can add snippets. So you could create your own local “html-snippets” package, “scss-snippets” package, and etc.


Yeah I thought of that already but that’s difficult to configure in the long end.

I will open an issue on the github page of snippets.

EDIT: Just tried a require because basically Atom is Node, but it didn’t work.


There was a recent change to the snippets package (and possibly others) to stop evaluating CSON files as actual CoffeeScript code and only parse them as data. So I’m not surprised the require didn’t work.