Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Can I create snippets in init.coffee programly? #181

Open
giyyapan opened this issue Nov 3, 2015 · 0 comments
Open

Can I create snippets in init.coffee programly? #181

giyyapan opened this issue Nov 3, 2015 · 0 comments

Comments

@giyyapan
Copy link

giyyapan commented Nov 3, 2015

Hi all!
I've got some snippets used in different scops (<{tagName}></{tagName}> for both html and jsx for example), and I have to write them many times in snippets.cson for different scrops.

So is there a way to add a snippets programly with some atom api like atom.snippets.add(scope, snippets), so I can do

htmlSnippets =
  '<tag></tag>':
    prefix:'t'
    body:"""
      <${1:tagName} $0></${1:tagName}>
    """
atom.snippets.add(scope,htmlSnippets) for scope in ['.text.html','.source.coffee']

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants