Skip to content

Instantly share code, notes, and snippets.

@qmmr
Last active December 15, 2015 22:49
Show Gist options
  • Save qmmr/5335653 to your computer and use it in GitHub Desktop.
Save qmmr/5335653 to your computer and use it in GitHub Desktop.
Sublime Text 2 preferences & key maps
[
// mimic keybindings of eclipse
// duplicate line
{ "keys": ["super+alt+down"], "command": "duplicate_line" }
// swapping lines
,{ "keys": ["alt+up"], "command": "swap_line_up" }
,{ "keys": ["alt+down"], "command": "swap_line_down" }
// multiple cursors
,{ "keys": ["super+shift+up"], "command": "select_lines", "args": {"forward": false} }
,{ "keys": ["super+shift+down"], "command": "select_lines", "args": {"forward": true} }
// bracket highlighter plugin -> select inside quotes
//,{ "keys": ["super+shift+d"], "command": "bracket_highlighter_key", "args": {"lines" : true, "plugin": {"type": ["quote","bracket","tag"], "command": "bracket_plugins.select_bracket"} } }
// macros
// delete line
, { "keys": ["d", "d"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Line.sublime-macro"} }
]
[
// mimic keybindings of eclipse
// duplicate line
{ "keys": ["ctrl+alt+down"], "command": "duplicate_line" },
// swapping lines
{ "keys": ["alt+up"], "command": "swap_line_up" },
{ "keys": ["alt+down"], "command": "swap_line_down" },
// multiple cursors
{ "keys": ["ctrl+shift+up"], "command": "select_lines", "args": {"forward": false} },
{ "keys": ["ctrl+shift+down"], "command": "select_lines", "args": {"forward": true} },
// bracket highlighter plugin -> select inside quotes
{ "keys": ["ctrl+shift+d"], "command": "bracket_highlighter_key", "args": {"lines" : true, "plugin": {"type": ["quote","bracket","tag"], "command": "bracket_plugins.select_bracket"} } },
// join lines
{ "keys": ["ctrl+j"], "command": "join_lines" },
// macros
// delete line
// { "keys": ["d", "d"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Line.sublime-macro"} },
// end of line semicolon
{ "keys": ["ctrl+;"], "command": "run_macro_file", "args": {"file": "Packages/User/EOL Semicolon.sublime-macro"} },
// end of line semicolon<enter>
{ "keys": ["ctrl+shift+;"], "command": "run_macro_file", "args": {"file": "Packages/User/New Line Semicolon.sublime-macro"} },
// vintage vim mode
{ "keys": ["j", "j"], "command": "exit_insert_mode", "context": [{ "key": "setting.command_mode", "operand": false }, { "key": "setting.is_widget", "operand": false } ] }
// advanced new file plugin
// { "keys": ["n", "f"], "command": "advanced_new_file"}
]
{
"auto_complete_commit_on_tab": true,
"bold_folder_labels": true,
// "color_scheme": "Packages/Tomorrow Color Schemes/Tomorrow-Night-Bright.tmTheme",
"color_scheme": "Packages/Solarized Color Scheme/Solarized (dark).tmTheme",
"draw_white_space": "selection",
"ensure_newline_at_eof_on_save": true,
"fallback_encoding": "Central European (ISO 8859-2)",
"file_exclude_patterns":
[
"*.ico",
"*.pyc",
"*.pyo",
"*.exe",
"*.dll",
"*.obj",
"*.o",
"*.a",
"*.lib",
"*.so",
"*.dylib",
"*.ncb",
"*.sdf",
"*.suo",
"*.pdb",
"*.idb",
".DS_Store",
"*.class",
"*.psd",
"*.db"
],
"folder_exclude_patterns":
[
".svn",
".git",
".hg",
"CVS",
".sass-cache"
],
"font_face": "Inconsolata",
"font_size": 15,
"highlight_modified_tabs": true,
"ignored_packages":
[
"vintage"
],
"indent_guide_options":
[
"draw_active",
"vintage"
],
// Adds two vertical rulers: one at line 80 and one at line 100
"rulers": [80, 100],
// This is an OSX bug
"open_files_in_new_window": false,
// If you like to scroll :)
"scroll_past_end": true,
// Get rid of annoying warnings
"detect_slow_plugins": false,
"line_padding_bottom": 2,
"line_padding_top": 2,
"tab_size": 4,
"translate_tabs_to_spaces": true,
"trim_trailing_white_space_on_save": true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment