Although you're free to use any editor we recommend Sublime. Here's how to get the most out of it
Once you've installed Sublime there's a few things you should do to get things set up properly:
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.
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.
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
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.
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.