18

I'm trying to define some snippets for editing Markdown, but I can't get them to trigger. I have tried using source.markdown, text.markdown and markdown as the scope, but none of them work. If I remove the scope constraint, the snippet works.

How do I figure out what scope to use?

Hubro
  • 6,016

2 Answers2

35

To determine the current scope under your cursor, Ctrl+Alt+Shift+P on Windows and Linux does the trick, Ctrl+Shift+P on a Mac.

Alternatively, run the following in the Sublime console:

view.scope_name(view.sel()[0].begin())

To bring up the console on Windows, press Ctrl+'

awatts
  • 546
2

The scope for Markdown is text.html.markdown. I think there are several packages that help you identify the current scope, ScopeAlways is one of them.

idleberg
  • 1,392