Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create markdown snippets in atom.

Tags:

atom-editor

Anyone know how? I am trying this but it doesn't work:

'text.html.markdown':
  'Bash':
    'prefix': '`B'
    'body': '```Bash\n\n```'
  'rubyonrails':
    'prefix': '`r'
    'body': '```rubyonrails\n\n($1)```'
like image 584
Jwan622 Avatar asked Jul 20 '15 14:07

Jwan622


People also ask

Can you write Markdown in Atom?

Markdown-Writer for Atom. Adds tons of features to make Atom a better Markdown/AsciiDoc editor! Works great with static blogging as well. Try it with Jekyll, Octopress, Hexo or any of your favorite static blog engines.


1 Answers

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)```'
like image 75
afontaine Avatar answered Oct 24 '22 22:10

afontaine