Skip to content

Instantly share code, notes, and snippets.

@mythical-programmer
Last active August 30, 2015 16:29
Show Gist options
  • Save mythical-programmer/946d35b1c6099ecd9124 to your computer and use it in GitHub Desktop.
Save mythical-programmer/946d35b1c6099ecd9124 to your computer and use it in GitHub Desktop.
sublime: keybindings keyboard shortcuts user
[
{ "keys": ["ctrl+w"], "command": "pass" },
{ "keys": ["ctrl+shift+w"], "command": "close" },
// default: ctrl+e zen coding expansion a.link<ctrl+e> gives <a class="link"></a>
// duplicate and delete line
{ "keys": ["ctrl+d"], "command": "duplicate_line" },
// sorry crtl+k is used for multiple stuffs
{ "keys": ["ctrl+shift+k"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} },
// multiple cursors
{ "keys": ["ctrl+shift+d"], "command": "find_under_expand" },
{ "keys": ["ctrl+shift+g"], "command": "find_all_under" },
{ "keys": ["ctrl+shift+l"], "command": "split_selection_into_lines" },
{ "keys": ["ctrl+alt+up"], "command": "select_lines", "args": {"forward": false} },
{ "keys": ["ctrl+alt+down"], "command": "select_lines", "args": {"forward": true} },
//comments
{ "keys": ["ctrl+q"], "command": "toggle_comment", "args": { "block": false } },
{ "keys": ["ctrl+/"], "command": "toggle_comment", "args": { "block": true } },
// move lines
{ "keys": ["alt+up"], "command": "swap_line_up" },
{ "keys": ["alt+down"], "command": "swap_line_down" },
// switch tabs/ windows
{ "keys": ["alt+right"], "command": "next_view" },
{ "keys": ["alt+left"], "command": "prev_view" },
// block selections or bracket selections (b)
{ "keys": ["ctrl+shift+b"], "command": "expand_selection", "args": {"to": "brackets"} },
{ "keys": ["ctrl+b"], "command": "move_to", "args": {"to": "brackets"} },
// shell
// { "keys": ["ctrl+shift+t"], "command": "exec", "args": {"geany": true}}, // block selection
{ "keys": ["super+i"], "command": "insert", "args": {"characters": "lorem ipsum"}},
{ "keys": ["super+t"], "command": "exec", "args": {"cmd": ["gnome-terminal", "-t", "sublime_shell", "--geometry", "150x13+0+480"]} },
// In os keyboard shortcuts, set [super+s] --> [wmctrl -a "Sublime Text"]
// super+t opens terminal (cd to required directory); then use super+s, super+x alternatively to switch between Sublime Text and sublime shell (terminal)
{ "keys": ["alt+w"], "command": "exec", "args": {"cmd": ["wmctrl", "-a", "sublime_shell"]}},
// need to install "RegReplace" package for following
// Simulate Strip Trailing/eNDING WhiteSpace from whole file
{ "keys": ["ctrl+shift+e"], "command": "reg_replace",
"args": {"replacements": ["remove_trailing_spaces"], "find_only": true}
},
// to edit better completion file codes inline
{ "keys": ["ctrl+2"], "command": "reg_replace",
"args": {"replacements": ["newlines_to_escaped_newline_chars", "tabs_to_escaped_tab_chars"]}
},
{ "keys": ["ctrl+3"], "command": "reg_replace",
"args": {"replacements": ["escaped_newline_chars_to_newlines", "escaped_tab_chars_to_tabs"]}
},
////////////////////////////////////////////////////////////////////////////
// need to install "Chain of command" package for following
// duplicate tab with all contents and call save
////////////////////////////////////////////////////////////////////////////
{ "keys": ["ctrl+shift+n"],
"command": "chain",
"args": {
"commands": [
["select_all"],
["copy"],
["new_file"],
["paste"],
["save"]
]
}
},
// plainTasks
{ "keys": ["ctrl+alt+d"], "command": "plain_tasks_complete","context": [{ "key": "selector", "operator": "equal", "operand": "text.todo" }] },
{ "keys": ["ctrl+alt+c"], "command": "plain_tasks_cancel", "context": [{"key": "selector", "operator": "equal", "operand": "text.todo" }] },
{ "keys": ["ctrl+alt+enter"], "command": "plain_tasks_new","context": [{ "key": "selector", "operator": "equal", "operand": "text.todo" }] },
{ "keys": ["ctrl+alt+a"], "command": "plain_tasks_archive","context": [{ "key": "selector", "operator": "equal", "operand": "text.todo" }] },
////////////////////////////////////////////////////////////////////////////
// split windows and movements
////////////////////////////////////////////////////////////////////////////
// single windows
{ "keys": ["alt+shift+keypad1"], "command": "set_layout",
"args": {
"cols": [0.0, 1.0],
"rows": [0.0, 1.0]
}
},
{ "keys": ["alt+shift+left"], "command": "set_layout",
"args": {
"cols": [0.0, 0.66, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
}
},
{ "keys": ["alt+shift+right"], "command": "set_layout",
"args": {
"cols": [0.0, 0.33, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
}
},
{ "keys": ["alt+1"], "command": "focus_group", "args": { "group": 0 } },
{ "keys": ["alt+2"], "command": "focus_group", "args": { "group": 1 } },
{ "keys": ["alt+3"], "command": "focus_group", "args": { "group": 2 } },
{ "keys": ["alt+4"], "command": "focus_group", "args": { "group": 3 } },
// { "keys": ["ctrl+1"], "command": "move_to_group", "args": { "group": 0 } },
// { "keys": ["ctrl+2"], "command": "move_to_group", "args": { "group": 1 } },
// { "keys": ["ctrl+3"], "command": "move_to_group", "args": { "group": 2 } },
// { "keys": ["ctrl+4"], "command": "move_to_group", "args": { "group": 3 } },
{ "keys": ["alt+keypad1"], "command": "focus_group", "args": { "group": 0 } },
{ "keys": ["alt+keypad2"], "command": "focus_group", "args": { "group": 1 } },
{ "keys": ["alt+keypad3"], "command": "focus_group", "args": { "group": 2 } },
{ "keys": ["alt+keypad4"], "command": "focus_group", "args": { "group": 3 } },
{ "keys": ["ctrl+keypad1"], "command": "move_to_group", "args": { "group": 0 } },
{ "keys": ["ctrl+keypad2"], "command": "move_to_group", "args": { "group": 1 } },
{ "keys": ["ctrl+keypad3"], "command": "move_to_group", "args": { "group": 2 } },
{ "keys": ["ctrl+keypad4"], "command": "move_to_group", "args": { "group": 3 } },
// scroll lines
{ "keys": ["ctrl+up"], "command": "scroll_lines", "args": {"amount": 5.0 } },
{ "keys": ["ctrl+down"], "command": "scroll_lines", "args": {"amount": -5.0 } },
// #goto, navigation, move to
// goto line number
{ "keys": ["ctrl+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} },
// home without taking hands from center
{ "keys": ["alt+["], "command": "move_to", "args": {"to": "bol", "extend": false} },
// end without taking hands from center
{ "keys": ["alt+]"], "command": "move_to", "args": {"to": "eol", "extend": false} },
// important defaults
{ "keys": ["ctrl+i"], "command": "show_panel", "args": {"panel": "incremental_find", "reverse":false} },
{ "keys": ["ctrl+p"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} }, // goto anything
{ "keys": ["ctrl+shift+p"], "command": "show_overlay", "args": {"overlay": "command_palette"} } // get all the menu commands via keyboard search
// ctrl+r ctrl+p, then "@"; search for symbols/Resources
]
[
// default: ctrl+e zen coding expansion a.link<ctrl+e> gives <a class="link"></a>
// duplicate and delete line
{ "keys": ["ctrl+d"], "command": "duplicate_line" },
// sorry crtl+k is used for multiple stuffs
{ "keys": ["ctrl+shift+k"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} },
// multiple cursors
{ "keys": ["ctrl+shift+d"], "command": "find_under_expand" },
{ "keys": ["ctrl+shift+g"], "command": "find_all_under" },
{ "keys": ["ctrl+shift+l"], "command": "split_selection_into_lines" },
{ "keys": ["ctrl+alt+up"], "command": "select_lines", "args": {"forward": false} },
{ "keys": ["ctrl+alt+down"], "command": "select_lines", "args": {"forward": true} },
//comments
{ "keys": ["ctrl+q"], "command": "toggle_comment", "args": { "block": false } },
{ "keys": ["ctrl+/"], "command": "toggle_comment", "args": { "block": true } },
// move lines
{ "keys": ["alt+up"], "command": "swap_line_up" },
{ "keys": ["alt+down"], "command": "swap_line_down" },
// switch tabs/ windows
{ "keys": ["alt+right"], "command": "next_view" },
{ "keys": ["alt+left"], "command": "prev_view" },
// block selections or bracket selections (b)
{ "keys": ["ctrl+shift+b"], "command": "expand_selection", "args": {"to": "brackets"} },
{ "keys": ["ctrl+b"], "command": "move_to", "args": {"to": "brackets"} },
// shell
// { "keys": ["ctrl+shift+t"], "command": "exec", "args": {"geany": true}}, // block selection
{ "keys": ["super+i"], "command": "insert", "args": {"characters": "lorem ipsum"}},
{ "keys": ["super+t"], "command": "exec", "args": {"cmd": ["gnome-terminal", "-t", "sublime_shell", "--geometry", "150x13+0+480"]} },
// In os keyboard shortcuts, set [super+s] --> [wmctrl -a "Sublime Text"]
// super+t opens terminal (cd to required directory); then use super+s, super+x alternatively to switch between Sublime Text and sublime shell (terminal)
{ "keys": ["super+x"], "command": "exec", "args": {"cmd": ["wmctrl", "-a", "sublime_shell"]}},
// need to install "RegReplace" package for following
// Simulate Strip Trailing/eNDING WhiteSpace from whole file
{ "keys": ["ctrl+shift+e"], "command": "reg_replace",
"args": {"replacements": ["remove_trailing_spaces"], "find_only": true}
},
// to edit better completion file codes inline
{ "keys": ["ctrl+2"], "command": "reg_replace",
"args": {"replacements": ["newlines_to_escaped_newline_chars", "tabs_to_escaped_tab_chars"]}
},
{ "keys": ["ctrl+3"], "command": "reg_replace",
"args": {"replacements": ["escaped_newline_chars_to_newlines", "escaped_tab_chars_to_tabs"]}
},
////////////////////////////////////////////////////////////////////////////
// need to install "Chain of command" package for following
// duplicate tab with all contents and call save
////////////////////////////////////////////////////////////////////////////
{ "keys": ["ctrl+shift+n"],
"command": "chain",
"args": {
"commands": [
["select_all"],
["copy"],
["new_file"],
["paste"],
["save"]
]
}
},
// plainTasks
{ "keys": ["ctrl+alt+d"], "command": "plain_tasks_complete","context": [{ "key": "selector", "operator": "equal", "operand": "text.todo" }] },
{ "keys": ["ctrl+alt+c"], "command": "plain_tasks_cancel", "context": [{"key": "selector", "operator": "equal", "operand": "text.todo" }] },
{ "keys": ["ctrl+alt+enter"], "command": "plain_tasks_new","context": [{ "key": "selector", "operator": "equal", "operand": "text.todo" }] },
{ "keys": ["ctrl+alt+a"], "command": "plain_tasks_archive","context": [{ "key": "selector", "operator": "equal", "operand": "text.todo" }] },
////////////////////////////////////////////////////////////////////////////
// split windows and movements
////////////////////////////////////////////////////////////////////////////
// single windows
{ "keys": ["alt+shift+keypad1"], "command": "set_layout",
"args": {
"cols": [0.0, 1.0],
"rows": [0.0, 1.0]
}
},
{ "keys": ["alt+shift+left"], "command": "set_layout",
"args": {
"cols": [0.0, 0.66, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
}
},
{ "keys": ["alt+shift+right"], "command": "set_layout",
"args": {
"cols": [0.0, 0.33, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
}
},
{ "keys": ["alt+1"], "command": "focus_group", "args": { "group": 0 } },
{ "keys": ["alt+2"], "command": "focus_group", "args": { "group": 1 } },
{ "keys": ["alt+3"], "command": "focus_group", "args": { "group": 2 } },
{ "keys": ["alt+4"], "command": "focus_group", "args": { "group": 3 } },
// { "keys": ["ctrl+1"], "command": "move_to_group", "args": { "group": 0 } },
// { "keys": ["ctrl+2"], "command": "move_to_group", "args": { "group": 1 } },
// { "keys": ["ctrl+3"], "command": "move_to_group", "args": { "group": 2 } },
// { "keys": ["ctrl+4"], "command": "move_to_group", "args": { "group": 3 } },
{ "keys": ["alt+keypad1"], "command": "focus_group", "args": { "group": 0 } },
{ "keys": ["alt+keypad2"], "command": "focus_group", "args": { "group": 1 } },
{ "keys": ["alt+keypad3"], "command": "focus_group", "args": { "group": 2 } },
{ "keys": ["alt+keypad4"], "command": "focus_group", "args": { "group": 3 } },
{ "keys": ["ctrl+keypad1"], "command": "move_to_group", "args": { "group": 0 } },
{ "keys": ["ctrl+keypad2"], "command": "move_to_group", "args": { "group": 1 } },
{ "keys": ["ctrl+keypad3"], "command": "move_to_group", "args": { "group": 2 } },
{ "keys": ["ctrl+keypad4"], "command": "move_to_group", "args": { "group": 3 } },
// #goto, navigation, move to
// goto line number
{ "keys": ["ctrl+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} },
// home without taking hands from center
{ "keys": ["alt+["], "command": "move_to", "args": {"to": "bol", "extend": false} },
// end without taking hands from center
{ "keys": ["alt+]"], "command": "move_to", "args": {"to": "eol", "extend": false} },
// important defaults
{ "keys": ["ctrl+i"], "command": "show_panel", "args": {"panel": "incremental_find", "reverse":false} },
{ "keys": ["ctrl+p"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} }, // goto anything
{ "keys": ["ctrl+shift+p"], "command": "show_overlay", "args": {"overlay": "command_palette"} } // get all the menu commands via keyboard search
// ctrl+r ctrl+p, then "@"; search for symbols/Resources
]
[
// default: ctrl+e zen coding expansion a.link<ctrl+e> gives <a class="link"></a>
// duplicate and delete line
{ "keys": ["ctrl+d"], "command": "duplicate_line" },
// sorry crtl+k is used for multiple stuffs
{ "keys": ["ctrl+shift+k"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} },
// multiple cursors
{ "keys": ["ctrl+shift+d"], "command": "find_under_expand" },
{ "keys": ["ctrl+shift+g"], "command": "find_all_under" },
{ "keys": ["ctrl+shift+l"], "command": "split_selection_into_lines" },
{ "keys": ["ctrl+alt+up"], "command": "select_lines", "args": {"forward": false} },
{ "keys": ["ctrl+alt+down"], "command": "select_lines", "args": {"forward": true} },
//comments
{ "keys": ["ctrl+q"], "command": "toggle_comment", "args": { "block": false } },
{ "keys": ["ctrl+/"], "command": "toggle_comment", "args": { "block": true } },
// move lines
{ "keys": ["alt+up"], "command": "swap_line_up" },
{ "keys": ["alt+down"], "command": "swap_line_down" },
// switch tabs/ windows
{ "keys": ["alt+right"], "command": "next_view" },
{ "keys": ["alt+left"], "command": "prev_view" },
// block selections or bracket selections (b)
{ "keys": ["ctrl+shift+b"], "command": "expand_selection", "args": {"to": "brackets"} },
{ "keys": ["ctrl+b"], "command": "move_to", "args": {"to": "brackets"} },
// shell
// { "keys": ["ctrl+shift+t"], "command": "exec", "args": {"geany": true}}, // block selection
{ "keys": ["super+i"], "command": "insert", "args": {"characters": "lorem ipsum"}},
{ "keys": ["super+t"], "command": "exec", "args": {"cmd": ["gnome-terminal", "-t", "sublime_shell", "--geometry", "150x13+0+480"]} },
// In os keyboard shortcuts, set [super+s] --> [wmctrl -a "Sublime Text"]
// super+t opens terminal (cd to required directory); then use super+s, super+x alternatively to switch between Sublime Text and sublime shell (terminal)
{ "keys": ["super+x"], "command": "exec", "args": {"cmd": ["wmctrl", "-a", "sublime_shell"]}},
// need to install "RegReplace" package for following
// Simulate Strip Trailing/eNDING WhiteSpace from whole file
{ "keys": ["ctrl+shift+e"], "command": "reg_replace",
"args": {"replacements": ["remove_trailing_spaces"], "find_only": true}
},
// to edit better completion file codes inline
{ "keys": ["ctrl+2"], "command": "reg_replace",
"args": {"replacements": ["newlines_to_escaped_newline_chars", "tabs_to_escaped_tab_chars"]}
},
{ "keys": ["ctrl+3"], "command": "reg_replace",
"args": {"replacements": ["escaped_newline_chars_to_newlines", "escaped_tab_chars_to_tabs"]}
},
////////////////////////////////////////////////////////////////////////////
// need to install "Chain of command" package for following
// duplicate tab with all contents and call save
////////////////////////////////////////////////////////////////////////////
{ "keys": ["ctrl+shift+n"],
"command": "chain",
"args": {
"commands": [
["select_all"],
["copy"],
["new_file"],
["paste"],
["save"]
]
}
},
// plainTasks
{ "keys": ["ctrl+alt+d"], "command": "plain_tasks_complete","context": [{ "key": "selector", "operator": "equal", "operand": "text.todo" }] },
{ "keys": ["ctrl+alt+c"], "command": "plain_tasks_cancel", "context": [{"key": "selector", "operator": "equal", "operand": "text.todo" }] },
{ "keys": ["ctrl+alt+enter"], "command": "plain_tasks_new","context": [{ "key": "selector", "operator": "equal", "operand": "text.todo" }] },
{ "keys": ["ctrl+alt+a"], "command": "plain_tasks_archive","context": [{ "key": "selector", "operator": "equal", "operand": "text.todo" }] },
////////////////////////////////////////////////////////////////////////////
// split windows and movements
////////////////////////////////////////////////////////////////////////////
// single windows
{ "keys": ["alt+shift+keypad1"], "command": "set_layout",
"args": {
"cols": [0.0, 1.0],
"rows": [0.0, 1.0]
}
},
{ "keys": ["alt+shift+left"], "command": "set_layout",
"args": {
"cols": [0.0, 0.66, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
}
},
{ "keys": ["alt+shift+right"], "command": "set_layout",
"args": {
"cols": [0.0, 0.33, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
}
},
{ "keys": ["alt+1"], "command": "focus_group", "args": { "group": 0 } },
{ "keys": ["alt+2"], "command": "focus_group", "args": { "group": 1 } },
{ "keys": ["alt+3"], "command": "focus_group", "args": { "group": 2 } },
{ "keys": ["alt+4"], "command": "focus_group", "args": { "group": 3 } },
// { "keys": ["ctrl+1"], "command": "move_to_group", "args": { "group": 0 } },
// { "keys": ["ctrl+2"], "command": "move_to_group", "args": { "group": 1 } },
// { "keys": ["ctrl+3"], "command": "move_to_group", "args": { "group": 2 } },
// { "keys": ["ctrl+4"], "command": "move_to_group", "args": { "group": 3 } },
{ "keys": ["alt+keypad1"], "command": "focus_group", "args": { "group": 0 } },
{ "keys": ["alt+keypad2"], "command": "focus_group", "args": { "group": 1 } },
{ "keys": ["alt+keypad3"], "command": "focus_group", "args": { "group": 2 } },
{ "keys": ["alt+keypad4"], "command": "focus_group", "args": { "group": 3 } },
{ "keys": ["ctrl+keypad1"], "command": "move_to_group", "args": { "group": 0 } },
{ "keys": ["ctrl+keypad2"], "command": "move_to_group", "args": { "group": 1 } },
{ "keys": ["ctrl+keypad3"], "command": "move_to_group", "args": { "group": 2 } },
{ "keys": ["ctrl+keypad4"], "command": "move_to_group", "args": { "group": 3 } },
// #goto, navigation, move to
// goto line number
{ "keys": ["ctrl+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} },
// home without taking hands from center
{ "keys": ["alt+["], "command": "move_to", "args": {"to": "bol", "extend": false} },
// end without taking hands from center
{ "keys": ["alt+]"], "command": "move_to", "args": {"to": "eol", "extend": false} },
// important defaults
{ "keys": ["ctrl+i"], "command": "show_panel", "args": {"panel": "incremental_find", "reverse":false} },
{ "keys": ["ctrl+p"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} }, // goto anything
{ "keys": ["ctrl+shift+p"], "command": "show_overlay", "args": {"overlay": "command_palette"} } // get all the menu commands via keyboard search
// ctrl+r ctrl+p, then "@"; search for symbols/Resources
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment