Sublime Text 3 Setup

Published on Apr 29, 2015

The more I use Sublime Text, the more convinced I am that it's the best text editor there is. It's just so powerful, has so many plugins, and offers users so many more options than other editors. I read through @wesbos's book, Sublime Text Power User, and my developing life has been changed forever.

The Book

First of all, if you use Sublime Text, you need to go buy that book ASAP. Trust me, it will give you so much information that you can add in to your daily workflow and make you so much more effective. It does cost a little bit of time and money, but I feel I've made up for that with the tools I've learned. I want to go through a couple of my favorites before talking about my Sublime Text setup.

The Command Palette

Bos focuses quite a bit at the beginning of the book on the command palette. It was something that, although I'd been using Sublime for a couple of years, I didn't even know how to use. The option I use most frequently is command + p. This little keystroke opens up the command palette for you to search for and open any file in your project. Instead of grabbing the mouse and clicking through who knows how many levels of folders, you can open any file within seconds.

Another command palette option I use a lot if command + r. This keystroke allows you to search for a code block in your file. I mostly use it in a CSS or SCSS file to find a style rule. In CSS files, it's similar to what command + f will do, but after searching and finding what you need, hitting enter puts you right on that specific line, closes the command palette, and lets you go to work.

Plugins

Bos goes into detail on a couple different plugins that he uses frequently, and by pointing them out it allowed me to learn about and implement them into my workflow. Here are my two favorites:

Emmet

I hadn't heard about Emmet before reading the book, but it's another that has sped up my work and productivity a ton. By being able to type div.container>div.col>p{Some Text}, hitting tab, and having the code be there on my page saves me a lot of time. Another time saver is in CSS files, where there are millions of keyboard shortcuts for all the different style attributes. Emmet saves me thousands of keystrokes a day.

Origami

I just started using Origami recently, but I like what it offers so far. I like a certain layout for my window when I work (one big pane for my HTML file, one smaller pane for the CSS/SCSS), but every time I start working I have to resize the windows to get it to where I want it. Origami allows you to save a layout and then restore it the next time you open Sublime Text. It's really cool, and I plan on looking into the other things that Origami will allow me to do.

In the end, the book has so much information in it, and these are only a couple of the many things that I learned about from reading the book. Like I said, buy the book; you won't regret it.

Restoring Sublime Text

The last thing for today is actually another thing that Sublime Text Power User talks about, and that is syncing your Sublime Text preferences, package list, keybindings, etc. across devices. There are two ways to do this: Dropbox or git. I chose git, so I'm going to talk about that a little bit.

Basically, in a nutshell, you have a User folder in Sublime Text 3 that houses all the files that you can use to customize Sublime Text 3. By making that a repo and pushing it every time you update something, you always have the setup that you like. Find a new plugin? Install it, commit, and push and you'll have it on your other computers as well.

I recently had to move to a new Mac at work, and after installing Sublime Text, I was up and running on the new computer in about five minutes, with all my plugins, preferences, keybindings, macros, snippets, etc. all brought over. In the past when I would start working on a new computer, I'd have to look at another computer and figure out which plugins I was using, search for each of them individually, email myself a copy of the keybindings...the whole nine yards. Bottom line is that I did all of that just by cloning a repo.

Conclusion

Sublime Text is, in my opinion, the greatest text editor out there. It's so flexible, customizable, and easy to use. And if you pair that with a great book on how to best use it, you'll be able to speed up your development and optimize your workflow as well.