2

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

1 Answer 1

3

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
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks Lee, creating symlink is probably what I want to do. It would be annoying for version control and portability but creating a package for a single snippets seems like overkill

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.