A new user's guide to SublimeText 2. Estimated reading time: 2 mins. Estimated workthrough time: 12 minutes.
import urllib2,os; pf='Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler( ))); open( os.path.join( ipp, pf), 'wb' ).write( urllib2.urlopen( 'http://sublime.wbond.net/' +pf.replace( ' ','%20' )).read()); print( 'Please restart Sublime Text to finish installation')
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.
Scss
in Package Control.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
In the File Menu, go to SublimeText
→ Preferences
→ Settings – 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/Monokai.tmTheme",
"detect_indentation": true,
"fade_fold_buttons": true,
"folder_exclude_patterns":
[
".svn",
".git",
".hg",
"CVS",
"tmp",
".bundle",
".sass-cache"
],
"font_size": 12.0,
"highlight_line": true,
"highlight_modified_tabs": true,
"ignored_packages":
[
"Vintage"
],
"line_padding_bottom": 1,
"line_padding_top": 1,
"rulers":
[
80
],
"soda_classic_tabs": false,
"soda_folder_icons": true,
"tab_size": 4,
"theme": "Soda Light.sublime-theme",
"translate_tabs_to_spaces": true,
"trim_trailing_white_space_on_save": true,
"word_wrap": true,
"wrap_width": 120
}
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 !important
s, 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.