No matter what language you program in, you probably use some type of text editor (or IDE) to write your code. There are a ton of choices out there. I’m sure we each have our own opinions on what is good and bad in an editor as well as what is necessary, depending on the type of work you are doing.

A good editor can make you more productive , by providing frequently used shortcuts, good syntax highlighting, and easy ways to navigate your text. Or, it can make you less productive by providing no shortcuts, no highlighting, and making you use the mouse to navigate. (I’m looking at you Notepad.)

I’ve never really found an editor that hits my needs right on the head, so I thought I’d write down some of my opinions and experiences.

When I got to school and was introduced to Unix, my lab TA told my class write our files using “Either Vim or Emacs, it doesn’t really matter which.” This hid the entire holy war of editors from me. Unknowingly, I chose to work with vim. I really had no reason, I just found all the keyboard shortcuts of Emacs confusing and liked the name better. (reasonable, I know) The different command modes of vim did give me quite a few headaches and made it hard to learn, but after a while it felt natural.

I’ve become pretty committed to Vim at this point. I use it almost exclusively to work on my school projects over an SSH connection to the school’s servers. Vim has about 5 keystrokes you have to learn to even use the program, but after that, if you don’t want to learn more features, you don’t have to. However, it has a ton of really useful commands that can make you a lot more productive, such as code folding, syntax highlighting, even spell checking. The help files are also really, well, helpful! I feel pretty comfortable with Vim but I’m interested in learning how to use some of the more advanced features. Because of this, I recently purchased O’Reilly’s book on Vim. It’s a pretty dry read, but it is really full of good information. 9780596529833_lrg

The problem with Vim is it’s really meant to be used from a command line; it just doesn’t feel right in a GUI environment (at least to me). So when I’m SSH’ing into a computer remotely or working on a Unix system, vim is my goto editor, but for Windows or when I want to use a graphical editor, I need to look elsewhere.

I’ve used quite a few different editors trying to find a good fit for myself and I came up with a list of qualities that I like:

  1. Lots of handy shortcuts
  2. Minimal need to use the mouse
  3. External shell/interpreter command
  4. Integrated version control
  5. Integrated build controls

The first two qualities are really important. Otherwise, you’re going to spend more time getting ready to edit text than actually editing text. By having to use the mouse, you completely ruin any flow you get from touch typing and drastically lower your typing speed. More than anything, an editor has to have these two qualities, otherwise, it’s not worth bothering with.

Quality 3 is important so that you’re not having to constantly switch back and forth between your editor and a command prompt. Granted, it’s not too hard to just keep a terminal window open in the background, but this is one of the little things that makes a good editor great.

If your editor has a built in command prompt, you really don’t need a separate set of commands for version control or for building projects. These two qualities almost make your editor an IDE. Regardless, both are handy and worth a few points.

On Mac OS X and Linux, I’ve really only found Netbeans to be enjoyable to work with. It has a lot of power built in and a slew of plugins can expand it even further. The fact that it work on Windows, Mac OS X, and Linux is also a benefit since I don’t have to relearn software for each platform. However, if I just want to do a little quick editing, Netbeans is way too heavy for my tastes.

On my Mac, I also tried out Coda and Komodo Edit. However, these were much better suited for web development, while I do most of my work in C, C++, or Erlang. I really liked these editors, they just weren’t suited for the type of work that I do.

Because of this, I’ll stick with vim on Mac or Linux.

Windows has gVim and vim on the command prompt, but they just don’t feel right to me.

I browsed around and found SlickEdit. I really liked the fact that it was cross-platform. I also really liked its performance. However, it didn’t support  the version control systems I use (neither Mercurial nor Git), but it does support some such as SVN or CVS. Even still, it was a good product and I decided I wanted to purchase a license. As a student, I qualify for academic pricing (much better than $300+ for one license!). However, they never called me back (you have to call to verify you are a student) about getting a license… Pretty hard to believe a company won’t call a potential customer back. So if you can get them to sell you a license, I’d recommend SlickEdit, but I was unable to get them to sell me a copy.

I tried a few other editors, with jEdit being the most noticeable, until I found the wonderful Notepad++. This editor has a bunch of convenient shortcuts to it, but more importantly, it just feels good. This is probably due to the fact that its based on the Scintilla component. (Weird that I like Scintilla, but note Scite, the Scintilla Text Editor) If you’ve never used Notepad++ before, I’d HIGHLY recommend getting a (free!) copy of it.

It supports a bunch of different languages, it has a good plugin selection, and you can even get custom themes for it as well. I’d list all the features it has, but the website has a much better list than I could ever give.

While Notepad++ is great, I think I found an even better editor the other day. In fact, this editor bills itself as, “The text editor you’ll fall in love with.” What is this mysterious, wonderful editor you ask? It’s Sublime Text. I just found it this week, so I’m still not too familiar with it yet, but I’m loving what I’m seeing so far.

pythonHeroSmallNearly every command has a keyboard shortcut associated with it. If that’s not enough, you can even remap them yourself using a simple XML configuration file. It almost feels like vim with the number of shortcuts available! There are quite a few plugins available, and it looks very easy to write new plugins. (It doesn’t integrate directly with Mercurial, so I plan to write a plugin for that)

It has an external shell prompt, there is an external build command, and plugins available for version control. It looks like this editor has everything that I want! There is a free demo available and licenses really aren’t that expensive ($59).

From now on, I plan to use Sublime Text and vim as my editors of choice, depending on the operating system I’m using. I recommend both of these, but your preferences are different from mine, so your milage may vary.

« »