Skip to content

Instantly share code, notes, and snippets.

@drewbkoch
Created March 17, 2014 17:35
Show Gist options
  • Save drewbkoch/9604242 to your computer and use it in GitHub Desktop.
Save drewbkoch/9604242 to your computer and use it in GitHub Desktop.

Installing Packages in Sublime Text 2

Installing packages in Sublime Text 2 is a great way to take advantage of plethora of pre-built tools developed by the community, ranging from themes that customize the look of your editor to support for different language styles, such as for Jade.

In order to take advantage of all of the wonderful packages out there, the first step is to install Package Control. So let's do that now.

  1. Open the console in Sublime by clicking View in the menu bar, then Show Console.

    Imgur

  2. Enter import urllib2,os,hashlib; h = '7183a2d3e96f11eeadd761d777e62404' + 'e330c659d4bb41d3bdf022e94cab3cd0'; 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()) ); by = urllib2.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); open( os.path.join( ipp, pf), 'wb' ).write(by) if dh == h else None; print('Error validating download (got %s instead of %s), please try manual install' % (dh, h) if dh != h else 'Please restart Sublime Text to finish installation')

  3. Restart Sublime.

####To run Package Control and install a package,

  1. Type command + shift + p
  2. Start typing Install Package, and hit enter to be brought to the installer mode.
  3. Type in the name of the package you would like to install, hit enter, and you're all done!

A few packages that I recommend include:

  • Theme - Spacegray --> my theme
  • ColorPick --> reveals a color picker for quick color selection
  • HTML Snippets --> great snippets to autocomplete mundane typing for html
  • CSS Snippets --> great snippets to autocomplete mundane typing for css
  • Jade --> support for the jade language

To find more great packages, check this out!

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