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

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

Open
@giyyapan

Description

@giyyapan

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!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions