Skip to content

Instantly share code, notes, and snippets.

@DaveOsborn
Forked from davatron5000/Sublime Text Setup.md
Last active August 29, 2015 14:02
Show Gist options
  • Save DaveOsborn/2bb5559a0460832b8487 to your computer and use it in GitHub Desktop.
Save DaveOsborn/2bb5559a0460832b8487 to your computer and use it in GitHub Desktop.

Make it useful

  • Install Package Control. For SublimeText 3, paste the following in Terminal:
import urllib.request,os,hashlib; h = 'eb2297e1a458f27d836c04bb0cbaf282' + 'd0e7a3098092775ccb37ca9d6b2e4b7d'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)

From here on out, use Package Control to install everything. +Shift+P, then type Install to get a list of installable packages you can 'livesearch through. After installing plugins, they should be running.

Make it look good

Add helpful tools

  • SideBarEnhancements for an actually useful sidebar.
  • GitGutter tracks line changes in the gutter.
  • Scss syntax highlighting is sorta necessary. Called Scss in Package Control.
  • SublimeLinter makes you code more good. Has HTML/CSS/JS linting and hinting.
  • Source Code Pro I love the look of this font for editing code!

There are infinity tools in Package Control, so if you have some kind of weird coding fetish, there's probably a package for you. #R34

Customize settings

In the File Menu, go to SublimeTextPreferencesSettings – User. It opens a JSON file with some options. Here's my setup. Go through and comment on/off each one to see what it does. I try and keep it alphabetized.

{
	"auto_complete": true,
	"auto_complete_commit_on_tab": true,
	"auto_complete_with_fields": true,
	"bold_folder_labels": true,
	"caret_style": "phase",
	"color_scheme": "Packages/Color Scheme - Default/Sunburst.tmTheme",
	"detect_indentation": true,
	"dictionary": "Packages/Language - English/en_GB.dic",
	"fade_fold_buttons": false,
	"file_exclude_patterns":
	[
		"SyncToy*",
		"*.sublime-workspace"
	],
	"folder_exclude_patterns":
	[
		".svn",
		".git",
		".hg",
		"CVS",
		"tmp",
		".bundle",
		".sass-cache"
	],
	"font_face": "Source Code Pro",
	"font_size": 15,
	"highlight_line": true,
	"highlight_modified_tabs": true,
	"ignored_packages":
	[
		"Vintage"
	],
	"line_padding_bottom": 1,
	"line_padding_top": 1,
	"rulers":
	[
		80
	],
	"soda_classic_tabs": true,
	"soda_folder_icons": false,
	"spell_check": true,
	"theme": "Soda Dark 3.sublime-theme",
	"translate_tabs_to_spaces": true,
	"trim_trailing_white_space_on_save": true,
	"word_wrap": true,
	"wrap_width": 120
}

Favorite features

Everybody has their favorite built-in features, here are mine:

  • ~$ subl .: You can symlink a SublimeText command line tool that can open folders you've navigated to Terminal. If you want a more graphical approach, drag a folder onto the icon.
  • +t: Quick open files. Just start typing the filename you want. No more folders. Glorious.
  • +f: Find in File. Bonus: Hitting alt+return to "Find All" will multi-select all instances of the search term. Start editing instantly.
  • +Shift+F: Find in Project. Great for grepping redundancies, finding !importants, and more. In the results, click the file location to open it.

There's infinity more features though. Setting up Projects is pretty bad ass because you can hide bullshit build folders (like stylesheets/ and _site/). I'm not a pro at it yet, but it's pretty handy. Lots to love.

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