Skip to content

Instantly share code, notes, and snippets.

@GirlBossRush
Created April 29, 2015 20:25
Show Gist options
  • Save GirlBossRush/11228af653add483882c to your computer and use it in GitHub Desktop.
Save GirlBossRush/11228af653add483882c to your computer and use it in GitHub Desktop.
[
{ "keys": ["home"], "command": "move_to", "args": {"to": "bol"} },
{ "keys": ["end"], "command": "move_to", "args": {"to": "eol"} },
{ "keys": ["alt+up"], "command": "swap_line_up" },
{ "keys": ["alt+down"], "command": "swap_line_down" },
{ "keys": ["super+shift+r"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} },
{ "keys": ["super+r"], "command": "goto_symbol_in_project" },
{ "keys": ["command+b"], "command": "show_panel", "args": {"panel": "replace"} },
////////////////////////////////////////////////////////////
// Clojure setup
// SublimeREPL bindings:
// =====================
// Start a new clojure repl. Leaves existing open. Note that SublimeREPL doesn't handle multiple
// REPLs very well. They will work but it's not clear which repl will receive commands sent from
// another clojure editor.
{ "keys": ["alt+super+l"], "command": "run_existing_window_command", "args":{"id": "repl_clojure",
"file": "config/Clojure/Main.sublime-menu"}},
{ "keys": ["alt+super+b"], "command": "repl_transfer_current", "args": {"scope": "block"}},
// Commands located in ClojureHelpers.py
{ "keys": ["alt+super+s"], "command": "load_selection_in_repl"},
// Replaces a built in command in Sublime REPL (it's faster)
// Press ctrl and comma, release then press f to laod the current file in the repl.
{ "keys": ["ctrl+,", "f"], "command": "load_file_in_repl"},
// Refreshes all code. Handle compilation errors correctly where user/reset will disappear.
{ "keys": ["alt+super+r"], "command": "refresh_namespaces_in_repl"},
// Exit the repl
{ "keys": ["ctrl+d"], "command": "run_command_in_repl", "args": {"command": "(System/exit 0)"}},
// Pretty print the last returned value
{ "keys": ["alt+super+p"], "command": "run_command_in_repl", "args": {"command": "(pp)"}},
// Refresh code then run tests from the current namespace in repl
{ "keys": ["alt+super+x"], "command": "run_command_in_namespace_in_repl", "args": {"command": "(run-tests)", "refresh_namespaces": true}},
// Runs the single selected test. You must select the test name.
{ "keys": ["alt+super+t"], "command": "test_selected_var_in_repl", "args": {"refresh_namespaces": false}},
// Refresh code then run all tests in in the project in the repl.
{ "keys": ["alt+super+a"], "command": "run_command_in_repl", "args": {"command": "(run-all-tests)", "refresh_namespaces": true}},
// Print documentation for selected function call.
{ "keys": ["alt+super+d"], "command": "run_on_selection_in_repl", "args": {"function": "clojure.repl/doc"}},
// Print source code for selected function call.
{ "keys": ["alt+super+c"], "command": "run_on_selection_in_repl", "args": {"function": "clojure.repl/source"}},
// List functions in a namespace
{ "keys": ["alt+super+n"], "command": "list_vars_in_selected_ns"},
// List functions with documentation in a namespace
{ "keys": ["alt+super+shift+n"], "command": "list_vars_with_docs_in_selected_ns"},
// Open the file and line containing a var that is currently selected
{ "keys": ["alt+super+o"], "command": "open_file_containing_var"},
// BracketHighlighter bindings:
// ===========================
// Swap bracket type
{ "keys": ["ctrl+shift+]"],
"command": "swap_brackets"},
// Swap quotes (only goes boths ways in supported languages...)
{ "keys": ["ctrl+shift+'"],
"command": "bh_key", "args": {
"lines" : true,
"plugin": {
"type": ["single_quote", "double_quote", "py_single_quote", "py_double_quote"],
"command": "bh_modules.swapquotes"
}
}
},
// Select text between brackets
// Jason Note: I found ctrl+shift+m works better for selecting text in brackets. It keeps expanding too.
{ "keys": ["ctrl+alt+a"],
"command": "bh_key", "args": {"lines" : true, "plugin": {"type": ["__all__"], "command": "bh_modules.bracketselect"} } },
// Select tag name of HTML/XML tag (both opening name and closing)
{ "keys": ["ctrl+alt+t"],
"command": "bh_key", "args": {"plugin": {"type": ["cfml", "html", "angle"], "command": "bh_modules.tagnameselect"} } },
// Toggle high visibility mode
{ "keys": ["alt+super+="],
"command": "bh_toggle_high_visibility"}
//////////////////
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment