Is there a way to load snippets from repos?

#1

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.

'.text.html.basic':
  '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.

#2

Hello.

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.)
https://github.com/mattddowney/amp-snippets

Regards.

#3

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.

#4

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.

#5

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?
tia

#6

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