Skip to content

Instantly share code, notes, and snippets.

@nicksergeant
Created July 28, 2013 23:46
Show Gist options
  • Save nicksergeant/6101135 to your computer and use it in GitHub Desktop.
Save nicksergeant/6101135 to your computer and use it in GitHub Desktop.
// Settings, user:
{
"bold_folder_labels": true,
"caret_style": "wide",
"color_scheme": "Packages/User/Molokai.tmTheme",
"create_window_at_startup": false,
"font_size": 14,
"highlight_line": true,
"ignored_packages": [],
"line_numbers": false,
"save_on_focus_lost": true,
"scroll_past_end": true,
"tab_size": 4,
"translate_tabs_to_spaces": true,
"use_simple_full_screen": true,
"vintage_start_in_command_mode": true
}
// Keyboard shortcuts, user:
[
// Sidebar
{ "keys": ["f2"], "command": "toggle_side_bar" },
// Comments
{ "keys": [",", "c", "c"],
"command": "toggle_comment",
"args": {
"block": false
}
},
// cmd + enter for full screen.
{"keys": ["super+enter"], "command": "toggle_full_screen"},
// 'jk' for esc.
{ "keys": ["j", "k"], "command": "exit_insert_mode",
"context":
[
{ "key": "setting.command_mode", "operand": false },
{ "key": "setting.is_widget", "operand": false }
]
},
{ "keys": ["j", "k"], "command": "exit_visual_mode",
"context":
[
{ "key": "setting.command_mode"},
{ "key": "num_selections", "operand": 1},
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": false }
]
},
{ "keys": ["j", "k"], "command": "hide_auto_complete", "context":
[
{ "key": "auto_complete_visible", "operator": "equal", "operand": true }
]
},
{ "keys": ["j", "k"], "command": "vi_cancel_current_action", "context":
[
{ "key": "setting.command_mode" },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": false },
{ "key": "vi_has_input_state" }
]
},
// Focus to top.
{ "keys": ["z", "enter"], "command" : "scroll_cursor_line_to_top", "context": [{"key": "setting.command_mode"}] },
// Tab for matching bracket.
{ "keys": ["tab"], "command": "set_motion", "args": {
"motion": "vi_move_to_brackets",
"motion_args": {"repeat": 1},
"inclusive": true },
"context": [{"key": "setting.command_mode"}]
},
// Ctrl + hjkl for focusing splits.
{ "keys": ["ctrl+h"], "command": "move_group_focus",
"args": {"direction": "left"},
"context": [{"key": "setting.vintage_ctrl_keys"}, {"key": "setting.command_mode"}]
},
{ "keys": ["ctrl+j"], "command": "move_group_focus",
"args": {"direction": "down"},
"context": [{"key": "setting.vintage_ctrl_keys"}, {"key": "setting.command_mode"}]
},
{ "keys": ["ctrl+k"], "command": "move_group_focus",
"args": {"direction": "up"},
"context": [{"key": "setting.vintage_ctrl_keys"}, {"key": "setting.command_mode"}]
},
{ "keys": ["ctrl+l"], "command": "move_group_focus",
"args": {"direction": "right"},
"context": [{"key": "setting.vintage_ctrl_keys"}, {"key": "setting.command_mode"}]
},
// 'H' goes to beginning of line, 'L' goes to end.
{ "keys": ["H"], "command": "set_motion", "args": {
"motion": "vi_move_to_first_non_white_space_character",
"motion_args": {"extend": true },
"clip_to_line": true },
"context": [{"key": "setting.command_mode"}]
},
{ "keys": ["L"], "command": "set_motion", "args": {
"motion": "vi_move_to_hard_eol",
"motion_args": {"repeat": 1, "extend": true},
"inclusive": true,
"clip_to_line": true },
"context": [{"key": "setting.command_mode"}]
},
// "gd" for "search for word under cursor"
{ "keys": ["g", "d"], "command": "find_under_expand" },
// ",," for "Find file"
{ "keys": [",", ","], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },
// Folding
{ "keys": ["super+shift+l"], "command": "unfold",
"context": [{"key": "setting.command_mode"}]
},
{ "keys": ["super+shift+h"], "command": "fold",
"context": [{"key": "setting.command_mode"}]
},
{ "keys": ["z", "M"], "command": "fold_by_level", "args": {"level": 3} },
// Go to definition (requires Sublime CodeIntel).
{ "keys": ["g", "d", "d"], "command": "goto_python_definition" }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment