Skip to content

Instantly share code, notes, and snippets.

@ttscoff
Created August 22, 2012 02:30
Show Gist options
  • Save ttscoff/3421636 to your computer and use it in GitHub Desktop.
Save ttscoff/3421636 to your computer and use it in GitHub Desktop.
Markdown headlines for Sublime Text 2
// Keybinding for Sublime Text to wrap selection in hashmarks with padding space, incrementally up to six marks
{ "keys": ["#"], "command": "insert_snippet", "args": {"contents": "#${0: ${SELECTION/(^ | $)//g} }#"}, "context":
[
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown", "match_all": true },
{ "key": "preceding_text", "operator": "not_regex_contains", "operand": "#{6}", "match_all": true }
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment