biobirdman
biobirdman

Reputation: 4120

Atom Snippets : Snippets in Local Directory

Hi New atom editor user here (SO AMAZING)

I have been spending an hour or so getting my snippets to work in a local folder

My snippets work when I place my snippets in the ~/.atom

But I was wondering if I could get it to work in a local directory with following structure below :

example_1/
├── test.py
├── snippets
    └── snippets.cson

This is how my snippet look like :

'.source.python':
   'Console log':
     'prefix': 'log'
     'body': 'CATFORSALES'

I tried looking at the discussion board but still can't find any relevant. Either it is something really obvious that no one mentioned or im really blind (either way do let me know, I can get either my head checked or my eyes checked =))

Thanks in advance!

Cheers

Upvotes: 2

Views: 607

Answers (1)

Lee
Lee

Reputation: 18747

Snippets are loaded from:

  1. ~/.atom/snippets.cson
  2. ./snippets/*.cson in an Atom package

So your choices for how to load snippets from a file other than #1 are to:

  1. Symlink your snippets file to ~/.atom/snippets.cson
  2. Create an Atom package for your snippets

Upvotes: 3

Related Questions