Skip to content

Instantly share code, notes, and snippets.

@sebastianhoitz
Created March 9, 2012 18:10
Show Gist options
  • Save sebastianhoitz/2007824 to your computer and use it in GitHub Desktop.
Save sebastianhoitz/2007824 to your computer and use it in GitHub Desktop.
My Sublime Text 2 Key Bindings
[
// easy insert mode exiting
{ "keys": ["j", "j"], "command": "exit_insert_mode",
"context":
[
{ "key": "setting.command_mode", "operand": false },
{ "key": "setting.is_widget", "operand": false }
]
},
// toggle sidebar
{ "keys": [",", "r"], "command": "toggle_side_bar",
"context":
[
{ "key": "setting.command_mode" },
{ "key": "setting.is_widget", "operand": false }
]
},
// focus sidebar
{ "keys": [",", "t"], "command": "focus_side_bar",
"context":
[
{ "key": "setting.command_mode" },
{ "key": "setting.is_widget", "operand": false }
]
},
// Quick save
{ "keys": [" "], "command": "save",
"context":
[
{ "key": "setting.command_mode" }
]
},
// Go to definition
{ "keys": ["g", "d"], "command": "slurp_find_string",
"context":
[
{ "key": "setting.command_mode" }
]
},
// Easy duplicating
{ "keys": [",", "a"], "command": "duplicate_line",
"context":
[
{ "key": "num_selections", "operand": 1 }
]
},
// Open in Project
{ "keys": [",", "o", "p"], "command": "show_overlay",
"args": {"overlay": "goto", "show_files": true },
"context": [{ "key": "setting.command_mode" } ]
},
// Open in buffer
{ "keys": [",", "o", "o"], "command": "prompt_change_view",
"context": [{ "key": "setting.command_mode" } ]
},
// Toggle comment
{ "keys": [",", "c", " "], "command": "toggle_comment",
"args": { "block": false }
},
// Move cursor to left group
{ "keys": ["ctrl+h"], "command": "prev_group"},
// Move cursor to right group
{ "keys": ["ctrl+l"], "command": "next_group"},
// Move down in overlay
{ "keys": ["ctrl+j"], "command": "move", "args": {
"by": "lines",
"forward": true},
"context":
[
{ "key": "overlay_visible", "operator": "equal", "operand": true }
]
},
// Move up in overlay
{ "keys": ["ctrl+k"], "command": "move", "args": {
"by": "lines",
"forward": false},
"context":
[
{ "key": "overlay_visible", "operator": "equal", "operand": true }
]
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment