14

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)```'
0

3 Answers 3

29

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

Comments

3

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)```'

Comments

0

I had to change '.source.gfm' to '.text.md' in order to get this to work for me.

Note sure if this had any bearing on it but I'm using these markdown-related packages: language-markdown, markdown-writer, markdown-preview, markdown-scroll-sync

Comments

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.