From 52b0d1776d276ee56250f0e559a7f5577390317c Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Wed, 29 Jan 2020 16:41:53 -0800 Subject: [PATCH] Add my Sublime keybinds and prefs. --- .../Default (Windows).sublime-keymap | 38 +++++++++++++++++++ SublimeSnippets/Preferences.sublime-settings | 10 +++++ 2 files changed, 48 insertions(+) create mode 100644 SublimeSnippets/Default (Windows).sublime-keymap create mode 100644 SublimeSnippets/Preferences.sublime-settings diff --git a/SublimeSnippets/Default (Windows).sublime-keymap b/SublimeSnippets/Default (Windows).sublime-keymap new file mode 100644 index 0000000..9c4ff58 --- /dev/null +++ b/SublimeSnippets/Default (Windows).sublime-keymap @@ -0,0 +1,38 @@ +[ +{ "keys": ["ctrl+shift+w"], "command": "toggle_setting", "args": {"setting": "word_wrap"}}, +{ "keys": ["ctrl+shift+m"], "command": "toggle_minimap"}, +{ "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"}}, + +// 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 } + ] +} +] diff --git a/SublimeSnippets/Preferences.sublime-settings b/SublimeSnippets/Preferences.sublime-settings new file mode 100644 index 0000000..efbe033 --- /dev/null +++ b/SublimeSnippets/Preferences.sublime-settings @@ -0,0 +1,10 @@ +{ + "color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", + "font_face": "Consolas", + "font_size": 9, + "rulers": + [ + 80, + 100 + ] +}