Skip to content

Instantly share code, notes, and snippets.

@maker-leo
Forked from leoallen85/Sublime-Text.markdown
Last active December 14, 2015 19:19
Show Gist options
  • Save maker-leo/5135650 to your computer and use it in GitHub Desktop.
Save maker-leo/5135650 to your computer and use it in GitHub Desktop.
A guide to getting the most out of your new favourite editor Sublime Text

Sublime Text 2

Although you're free to use any editor we recommend Sublime. Here's how to get the most out of it

Setting up

Once you've installed Sublime there's a few things you should do to get things set up properly:

Package Control

Adding package control allows you to install any of hundreds of free sublime plugins. We'll be using some of these throughout the course, so best to get this installed now, using these instructions.

Sublime from the terminal

You can launch Sublime from the terminal by typing subl, but first run this command in your terminal

sudo ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /usr/bin/subl

You'll need to type in your password you use to login.

Update your settings

There's a few settings I'd advise tweaking to get your editor set up for coding Ruby. Go to the top menu and open Sublime Text 2 > Preferences > Settings - User. Replace the contents of the file with this file. The comments in the file explain why I've set everything as it is

Get Ruby build working

To run Ruby files from sublime you can press ⌘ + B, but it won't work properly with rvm. To fix this, enter in the terminal

subl ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/Ruby/Ruby.sublime-build

then copy this file in to Sublime Text and hit save.

Learning Sublime

Don't worry too much about learning Sublime, you'll pick it up as you go. But it's worth playing around with ⌘ + P, it's an incredibly powerful feature of Sublime that allows you to quickly jump to files or even parts of files.

For more tips have a look here:

  • Nettuts article has some great tips and repeats some of the setup I've gone through here. I return to this article regularly
  • There's also a video series from Nettuts which if you have time is worth looking at at some point, although maybe once you're done with Maker's!
  • Rob Dodson has another good article with some tips and tricks, although repeats a lot of the Nettuts article

The best advice is whenever you're feeling curious just have a browse through Sublime's menus and see what it can do! And keep an eye out for Sublime 3.

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