Permalink
Browse files

new bracketeer keybindings - * => ** in restructured text, >> => <% %…

…> in ERB, and autodelete **
  • Loading branch information...
1 parent 0bad3e8 commit 9647f728f435ba52806f96a9718babd6ea69f3be @colinta committed May 16, 2012
Showing with 20 additions and 0 deletions.
  1. +20 −0 Example.sublime-keymap
View
20 Example.sublime-keymap
@@ -23,6 +23,11 @@
//| reStructured Text
{ "keys": ["alt+`"], "command": "bracketeer", "args": { "braces": "````", "pressed": "``" } },
+ { "keys": ["*"], "command": "bracketeer", "args": { "braces": "**", "pressed": "*" }, "context":
+ [
+ { "key": "selector", "operator": "equal", "operand": "text.restructuredtext" }
+ ]
+ },
//| DJANGO CURLIES
// For django, liquid, jinja. All the grammars *I* have list 'source.smarty' as
@@ -54,6 +59,12 @@
{ "key": "preceding_text", "operator": "regex_contains", "operand": "<%$", "match_all": true }
]
},
+ { "keys": [">"], "command": "insert_snippet", "args": { "contents": ">$1<% $0" }, "context":
+ [
+ { "key": "selector", "operator": "equal", "operand": "source.ruby" },
+ { "key": "preceding_text", "operator": "regex_contains", "operand": "%$", "match_all": true }
+ ]
+ },
{ "keys": ["="], "command": "insert_snippet", "args": { "contents": "= $1 %>$0" }, "context":
[
{ "key": "selector", "operator": "equal", "operand": "source.ruby" },
@@ -140,5 +151,14 @@
{ "key": "preceding_text", "operator": "regex_contains", "operand": "‘$" },
{ "key": "following_text", "operator": "regex_contains", "operand": "^’" }
]
+ },
+ { "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context":
+ [
+ { "key": "selector", "operator": "equal", "operand": "text.restructuredtext" },
+ { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
+ { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
+ { "key": "preceding_text", "operator": "regex_contains", "operand": "\\*$" },
+ { "key": "following_text", "operator": "regex_contains", "operand": "^\\*" }
+ ]
}
]

0 comments on commit 9647f72

Please sign in to comment.