sublime/voussoir/Default (Windows).sublime-keymap

59 lines
3.2 KiB
Text

[
{ "keys": ["ctrl+shift+w"], "command": "toggle_setting", "args": {"setting": "word_wrap"}},
{ "keys": ["ctrl+shift+m"], "command": "toggle_minimap"},
{ "keys": ["ctrl+shift+b"], "command": "expand_selection", "args": {"to": "brackets"} },
{ "keys": ["alt+shift+."], "command": "insert_snippet", "args": { "name": "Packages/XML/long-tag.sublime-snippet" }},
{ "keys": ["shift+delete"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Line.sublime-macro"}},
{ "keys": ["ctrl+shift+space"], "command": "auto_complete" },
{ "keys": ["shift+alt+up"], "command": "select_lines", "args": {"forward": false} },
{ "keys": ["shift+alt+down"], "command": "select_lines", "args": {"forward": true} },
{
"keys": ["ctrl+shift+enter"],
"command": "insert", "args": {"characters": "\n#"},
"context": [{ "key": "selector", "operator": "equal", "operand": "source.python" }]
},
{
"keys": ["ctrl+shift+enter"],
"command": "insert", "args": {"characters": "\n//"},
"context": [{ "key": "selector", "operator": "equal", "operand": "source.js" }]
},
{ "keys": ["f4"], "command": "timestamp" },
{ "keys": ["f9"], "command": "sort_lines", "args": {"case_sensitive": false} },
{ "keys": ["ctrl+f9"], "command": "permute_lines", "args": {"operation": "unique"} },
// Disable default keybinds I don't care about
{ "keys": ["ctrl+b"], "command": "false" },
// Auto-pair backticks
{ "keys": ["`"], "command": "insert_snippet", "args": {"contents": "`$0`"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "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": "not_regex_contains", "operand": "[`a-zA-Z0-9_]$", "match_all": true },
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.double", "match_all": true }
]
},
{ "keys": ["`"], "command": "insert_snippet", "args": {"contents": "`${0:$SELECTION}`"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
]
},
{ "keys": ["`"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^`", "match_all": true }
]
},
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context":
[
{ "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": "`$", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^`", "match_all": true }
]
}
]