Skip to content

Instantly share code, notes, and snippets.

@LazyRen
Last active October 9, 2018 09:22
Show Gist options
  • Save LazyRen/7631b90e90e7c45908816555a4e71408 to your computer and use it in GitHub Desktop.
Save LazyRen/7631b90e90e7c45908816555a4e71408 to your computer and use it in GitHub Desktop.
[
{
"keys": ["super+i"],
"command": "unexpand_tabs",
"args": { "set_translate_tabs": true }
},
//open finder
{
"keys": ["super+shift+x"],
"command": "open_dir",
"args": {"dir": "$file_path", "file": "$file_name"}
},
//put ';' on eol and move next
{
"keys": ["super+;"],
"command": "run_macro_file",
"args": {"file": "Packages/User/superEndLineWiSemiColin.sublime-macro"}
},
{
"keys": ["super+shift+;"],
"command": "run_macro_file",
"args": {"file": "Packages/User/superEndLineWiColin.sublime-macro"}
},
// Move out of common paired characters () and [] with `Tab`
{
"keys": ["shift+enter"],
"command": "move",
"args": {"by": "characters", "forward": true},
"context": [
// Check if next char matches (followed by anything)
{ "key": "following_text", "operator": "regex_match", "operand": "(:?`|\\)|\\]|\\}).*", "match_all": true },
// ...and that there is a paid character before it on the same
// line. This lets you `tab` to Indent at lines with single ]s
// still, like in a JSOn file
{ "key": "preceding_text", "operator": "regex_contains", "operand": "(:?`|\\(|\\[|\\{)", "match_all": true }
]
},
// Move out of single and double quotes with `Tab`
{
"keys": ["shift+enter"],
"command": "move",
"args": {"by": "characters", "forward": true},
"context": [
{ "key": "following_text", "operator": "regex_match", "operand": "(?:\"|').*", "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "(?:\"|')", "match_all": true }
]
},
// Open terminal. Need 'Terminal' package already installed.
{ "keys": ["super+shift+t"], "command": "reopen_last_file" },
{ "keys": ["super+shift+c"], "command": "open_terminal" },
{ "keys": ["super+shift+alt+c"], "command": "open_terminal_project_folder" },
{ "keys": ["super+alt+up"], "command": "jump_back" },
{ "keys": ["super+e"], "command": "mark_and_move_do_it_all"},
{ "keys": ["super+d"], "command": "move", "args": {"by": "subword_ends", "forward": true, "extend": true}},
{ "keys": ["super+option+d"], "command": "find_under_expand",
"context": [ { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true } ]},
{ "keys": ["super+ctrl+d"], "command": "find_under_expand" },
{ "keys": ["f12"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} },
{ "keys": ["super+r"], "command": "goto_definition" },
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["super+shift+v"], "command": "paste" },
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment