Changing Up Your Code Editor
Wednesday November 14th, 2012How does your development environment affect workflow? Don't fear exploring other options when it comes to development.
With a vast array of text editors and Interface Development Environments (IDEs) available for use, picking a program to develop in can be an intimidating task. Over the past six years I have used a variety of IDEs and text editors that either fit my current mood or one that suited the project at hand, while being thoroughly unsatisfied with one more aspects of each of them. That is, until I found Sublime Text 2. As you continue to read, I will share with you my thoughts on several of the IDEs and text editors I have used, and what it is about Sublime Text 2 that has kept me happy.
Selecting an environment to develop in is almost as important as picking out a chair or bed that you like. If the chair isn’t comfortable, you aren’t going to want to sit in it and you will spend more time trying to get comfortable then you will actually working. The same goes for a development environment: if you aren’t comfortable with it day in and day out, it can greatly affect productivity.
GUI Development
For the better part of my six years as a developer I used Dreamweaver as my editor. Not for the WYSIWYG (what you see is what you get) aspect, since I never worked in anything but code view, but because it was an editor that I felt comfortable using. Prior to Dreamweaver I had used standard Notepad, Notepad+, and even the dreaded Microsoft FrontPage. After expanding my knowledge of coding languages, I began using other editors such as Eclipse, Netbeans, Visual Studio, and Aptana Studio, constantly changing to fit the various situations my programming needs demanded.
It was not until I saw a talk by Paul Irish about work flow that I began to think more about how my development environments affected my own productivity. I took the time to start investigating other editors. I had used numerous IDE style editors; however, I had never used any as more than a text editor with code hinting. Code hinting combined with auto tag closing, is one of the major things that kept drawing me back to Dreamweaver for web development.
Text Development
Dreamweaver served me faithfully for many years, though it was always bulky, had a tendency to crash, and the price tag is a downer. What I really wanted was a simple, fast, lean text editor that gave me access to code hinting, linting, and that wonderful auto tag closer. It was at this time that I came across Vim, Xcode, TextMate, and Sublime Text 2; all of these are quick and powerful text editors with several nice features, as well as some disconcerting ones.
Vim utilizes command line style input and is almost a full keyboard driven editor. The ability to use every feature of the editor without having to touch the mouse can be a great advantage. However, the learning curve and seemingly unforgiving nature of having to completely relearn the way that I work seemed like a step backwards that I was not willing to make.
Xcode and TextMate each share a fatal flaw. Few people, I’m sure, have the same chair at work that they do at home; however, if their chair fit them perfectly, was comfortable, and easy to adapt throughout the day, why would they not want to have a replica of it at home? Therein lies the problem I found with both Xcode and TextMate: cross-platform availability and compatibility. Both programs are OS X exclusive, and while I use OS X at work, I still stand firmly against using it at home, quickly removing my chances of using either editor.
And so we get to Sublime Text 2. A minuscule program, with versions available for OS X, Windows, and Linux, Sublime Text eliminated the need to have a separate editor for each Operating System. It also comes with a portable version, allowing me to install the program onto a flash drive and use it on any machine, at any time, regardless of the machine being used for development.
The fact that Sublime Text 2 would work just about anywhere was enough incentive for me to delve deeper into the features and functions of the editor. I quickly discovered that Sublime, like Vim, allows for quick access to features, functions, and document switching with the keyboard allowing you to perform tasks without having to move your hand to the mouse. This may take a fraction of a second, but that time adds up.
Customizing Sublime
That’s not all Sublime offered though. Out of the box, Sublime didn’t have some of the many features I had grown accustomed to with Dreamweaver such as linting and auto close. Enter Package Control, one of the many plug-ins for Sublime Text 2. With a large community-driven plug-in database Package Control allowed me to quickly and easily customize Sublime to have many of the features I used inside Dreamweaver and Eclipse, including All Autocomplete, FTP & SFTP support, and GIT along with a few new ones such as ZenCoding and SublimeTODO.
The ability to quickly add, customize, and remove plug-ins with Sublime allows me to add the features that I need and ignore the ones that I don’t care about. Every time I begin a new project, I know with a fair amount of certainty that if Sublime can’t currently tackle it, there’s probably a plug-in out there to help me tackle it.
My favorite feature of Sublime would have to be the snippets and custom hotkeys. The ability set it up so that pushing ctrl + ; can jump to the end of the line, add a semi-colon, and then return to a new line is amazing. Or that I can set up a snippet so if I type chref and hit tab, the line of code to add an external style sheet will be added to the page and move the cursor to any locations that I need to edit greatly improving the speed at which I can create a starting point. I have found snippets to be a wonderful way of shortening repetitive tasks.
Ultimately, transitioning into Sublime Text 2 was fairly smooth once I was able to add in many of the key features that I used in Dreamweaver. That combined with its ability to shorten several time consuming tasks have made the editor one of my favorites to date. Its ability to speed up my work flow has been a great help to my ability to stay on top of projects that may have a tight deadline. Check it out some time, respond with a comment and tell me which development environment you use.
Additional Reading:
Perfect Workflow in Sublime Test
Sublime Text 2 Tips and Tricks