Skip to content

Instantly share code, notes, and snippets.

@sam
Last active December 15, 2015 12:49
Show Gist options
  • Save sam/5263311 to your computer and use it in GitHub Desktop.
Save sam/5263311 to your computer and use it in GitHub Desktop.
Sublime Text 2 Preferences.

Sublime Text 2 Preferences.

NOTE: .json extensions added for Gist syntax highlighting. It should be stripped.

Open the following menu item: Sublime Text 2 -> Preferences -> Settings -- User and add the content of the Preferences.sublime-settings file. Tweak as you see fit. The save_on_focus_lost setting is really nice for Continuous Testing. For example, if you have an SBT ~test session running in a terminal, then when you're finish editing your code just cmd+tab over and your test starts compiling/executing. Saucy.

For the formatting key mappings, open the following menu item: Sublime Text 2 -> Preferences -> Key Bindings -- User and add the content of the Default (OSX).sublime-keymap -- User file. ctrl+f will reindent your current selection. ctrl+shift+f will reindent the whole file.

[
{ "keys": ["ctrl+f"], "command": "reindent", "args": {"single_line": true} },
{ "keys": ["ctrl+shift+f"], "command": "reindent", "args": {"single_line": false} }
]
{
"font_face": "",
"font_size": 20,
"tab_size": 2,
"translate_tabs_to_spaces": true,
"trim_trailing_white_space_on_save": true,
"save_on_focus_lost": true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment