-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDefault.sublime-keymap
20 lines (20 loc) · 2.14 KB
/
Default.sublime-keymap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
[// Auto-pair quotes even after string modifiers. Copied over from the default bindings with modifications to `preceding_text` and an added selector condition
{"keys":["\""] ,"command":"insert_snippet" ,"args":{"contents":"\"$0\""}, "context": [
{"key":"setting.auto_match_enabled" ,"operator":"equal" ,"operand":true },
{"key":"setting.kdl.keybind_disable" ,"operator":"not_equal" ,"operand":true },
{"key":"selection_empty" ,"operator":"equal" ,"operand":true , "match_all":true},
{"key":"following_text" ,"operator":"regex_contains" ,"operand":"^(?:\t| |\\)|]|\\}|>|$)" , "match_all":true},
{"key":"preceding_text" ,"operator":"regex_contains" ,"operand":"(?i)\\b[bfru]+$" , "match_all":true},
{"key":"selector" ,"operator":"equal" ,"operand":"(text.kdl|text.kdl1|text.kdl2)" },
{"key":"eol_selector" ,"operator":"not_equal" ,"operand":"string.quoted.double - punctuation.definition.string.end", "match_all":true},
]},
{"keys":["'"] ,"command":"insert_snippet" ,"args":{"contents":"'$0'"}, "context": [
{"key":"setting.auto_match_enabled" ,"operator":"equal" ,"operand":true },
{"key":"setting.kdl.keybind_disable" ,"operator":"not_equal" ,"operand":true },
{"key":"selection_empty" ,"operator":"equal" ,"operand":true , "match_all":true},
{"key":"following_text" ,"operator":"regex_contains" ,"operand":"^(?:\t| |\\)|]|\\}|>|$)" , "match_all":true},
{"key":"preceding_text" ,"operator":"regex_contains" ,"operand":"(?i)\\b[bfru]+$" , "match_all":true},
{"key":"selector" ,"operator":"equal" ,"operand":"(text.kdl|text.kdl1|text.kdl2)" },
{"key":"eol_selector" ,"operator":"not_equal" ,"operand":"string.quoted.single - punctuation.definition.string.end", "match_all":true},
]},
]