Is there a way to load snippets from repos?


I am trying to strategize a way to share boilerplate code snippets with my colleague at work. I have created snippets in the snippets.cson file on atom and I’m using them just fine, but I’m wondering if there’s a way to pull code from github instead of pasting it in the body.

  'English Skeleton':
    'prefix': 'en-skeleton'
    'body': G I T H U B L I N K

  'Arabic Skeleton':
    'prefix': 'ar-skeleton'
    'body': ' G I T H U B L I N K

With one repo for snippets, we won’t have to share snippets back and forth whenever changes are made.



How about creating a package. It can be a private package too.

A random example of the minimum you need:
(focus on the files and structure.)



If you create a package, you can keep all of your snippets in the repo and everyone can download them through Atom’s update process whenever you publish a change.


Thanks @danPadric / @DamnedScholar. The thing is, my colleagues use different editors. I looked into packaging it, but that’ll make it work only for me. However, I was able to find services that will achieve this for different editors. Thanks again.


That was an important thing to have mentioned from the start.
So could you now please be so kind as to detail what you are using for which editors?


You’re right. My bad.

Do you mean the snippets services I found? I’m now eyeing lepton and cacher to be used with atom and sublime. I’d welcome any other suggestions.

1 Like