Because we'll be starting with a fresh installation of Sublime Text, let's take a few moments to apply a quick bit of paint to the UI. Visuals are important, so don't skip this step!
Sublime Text offers countless overrides and configuration settings. In this episode, we'll apply a small handful of the ones I use most often in my own workflow.
You're surely aware of the
command-p shortcut for rapidly switching between files, but there are other ways to browse your codebase as well. Let's review a few of my favorite techniques.
I'm sure you're familiar with the process of creating basic snippets, but don't skimp on these. Seek out repeated keystrokes like a hawk. Can you instead translate that repetition into a reusable snippet? In this episode, we'll review just a few simple, yet enormously useful, expansions. In the process, we'll also pull in the SnippetMaker package to make the act of extracting snippets much less painful.
Out of the box, Sublime Text provides no error detection whatsoever. Forget a semicolon or brace? Sorry, you're on your own. Certainly, we can't have that, so let's pull in the Sublime Linter package to provide instant feedback each time we save a file.
It's great that we can now detect PSR-2 inconsistencies in our projects, but wouldn't it be nice if those issues could be automatically fixed without requiring an ounce of effort on our parts? And what if we could extend things further to provide extra optimizations? For example, can we automatically remove unused class imports each time we save a file? Well of course we can, thanks to php-cs-fixer.
If you maintain multiple codebases or open-source projects, you may find that manually switching between them can prove cumbersome. Instead, let's leverage Sublime's project functionality to ease the burden. We can even pull in the ProjectManager package to simplify things further.
If you work on multiple computers, such as a laptop and main workstation, you'll likely want to sync your Sublime Text settings between the two. We can accomplish this quite easily by leveraging Dropbox and symlinks. Let's review the full process in this episode.