How to create markdown snippets in atom.

The default scope for Markdown in Atom is .source.gfm, not text.html.markdown.

Your snippets would look like:

'.source.gfm':
  'Bash':
    'prefix': '`B'
    'body': '```Bash\n\n```'
  'rubyonrails':
    'prefix': '`r'
    'body': '```rubyonrails\n\n($1)```'

The scope depends on the language (package) you are using:

  • language-markdown: .text.md
  • language-gfm: .source.gfm

You can combine both selectors to cover both cases:

'.text.md, .source.gfm':
  'Bash':
    'prefix': '`B'
    'body': '```Bash\n\n```'
  'rubyonrails':
    'prefix': '`r'
    'body': '```rubyonrails\n\n($1)```'

Tags:

Atom Editor