Skip to content

Instantly share code, notes, and snippets.

@drublic
Last active October 10, 2015 15:07
Show Gist options
  • Save drublic/3709041 to your computer and use it in GitHub Desktop.
Save drublic/3709041 to your computer and use it in GitHub Desktop.
My Sublime Text 2 Settings
[
{ "keys": ["ctrl+alt+f"], "command": "use_it" },
{ "keys": ["ctrl+tab"], "command": "prev_view_in_stack" },
{ "keys": ["ctrl+shift+tab"], "command": "next_view_in_stack" },
{ "keys": ["ctrl+shift+j"], "command": "js_run" },
// Paste and indent
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["super+shift+v"], "command": "paste" },
// Insert console.log
{ "keys": ["super+shift+l"],
"command": "insert_snippet",
"args": {
"contents": "console.log(${1:}$SELECTION);${0}"
}
},
// Insert var_dump
{ "keys": ["super+shift+k"],
"command": "insert_snippet",
"args": {
"contents": "var_dump(${1:}$SELECTION);${0}"
}
}
]
{
"bold_folder_labels": true,
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"file_exclude_patterns":
[
".DS_Store",
".gitkeep"
],
"folder_exclude_patterns":
[
".git",
".sass-cache",
"tmp"
],
"font_face": "Source Code Pro",
"font_size": 12.0,
"highlight_line": true,
"highlight_modified_tabs": true,
"ignored_packages":
[
"Vintage"
],
"indent_guide_options": ["draw_normal", "draw_active"],
"line_padding_bottom": 1,
"line_padding_top": 1,
"rulers":
[
80
],
"scroll_past_end": true,
"tab_completion": true,
"tab_size": 4,
"theme": "Soda Light.sublime-theme",
"translate_tabs_to_spaces": false,
"trim_trailing_white_space_on_save": true
}
@drublic
Copy link
Author

drublic commented Sep 12, 2012

Oh, I'll try an italic font-style on that. Thanks for the tip!
Also when I'm on my MBA 11" I got a bigger font-size (13.0). This kinda correlates with 12.0 on my MBP.

@yellowled
Copy link

Funny thing: I tried some of your settings as well, i.e. the trailing spaces/eof stuff. I was a bit baffled since they didn't work. Turns out they only don't work in settings files, i.e. a trailing space in settings won't be remove on save, also breaking the eof setting. I guess this is because trailing spaces are not allowed in settings files anyway or something.

Anyway, thanks for that. Very useful, actually saves me a package (Trailing Spaces).

@drublic
Copy link
Author

drublic commented Sep 12, 2012

Apart from the whitespace-settings in this file I'd encourage you to use editorconfig (http://editorconfig.org/) in projects. @sindresorhus made a great ST2 plugin for that.

@jitendravyas
Copy link

Why "tab_completion": false, ?

@maxhoffmann
Copy link

@ttscoff suggested to add context to key shortcuts: https://gist.github.com/2951063#comment-354177

So you could use super+shift+l in javascript/php and it pastes the appropiate syntax.

@AlecRust
Copy link

"open_files_in_new_window": false is also handy.

@sebald
Copy link

sebald commented Jan 29, 2013

For easier comments I use these two:

{ "keys": ["ctrl+q"], "command": "toggle_comment", "args": { "block": false } }, { "keys": ["ctrl+shift+c"], "command": "insert_snippet", "args": {"name": "Packages/User/InsertSectionComment.sublime-snippet"} },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment