Quest for the perfect text editor

3 08 2009

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.

About these ads

Actions

Information

7 responses

4 08 2009
Mick

You might want to check out either Textmate or Coda for the Mac.

I also use E Text Editor on the PC (downside for me is that it requires Cygwin). Intype is really cool too, but development seems to have stalled.

4 08 2009
samkerr

Hi Mick.

I’ve tried Textmate and Coda, but neither of them really fits my workflow. I find TextMate cumbersome when I want to edit multiple files at once and Coda is more for web development, while I do mostly application development.

I’ve briefly tried E, but didn’t use it long enough to form an opinion either way.

I’ve not tried InType so I’ll give that a look!

6 08 2009
Nick

What drove you to Sublime, or more the point: what drove you away from SlickEdit?

6 08 2009
samkerr

Hi Nick, thanks for reading!

I actually plan to write a review about Sublime here in a few days, so you can read that when I’m done, but I really liked the feel of it and the massive amount of customization that is possible. In fact, nearly every option is somewhere in an XML file. For example, I didn’t like the key bindings to unindent text, so I just changed them to suit my taste.

As for what drove me away from SlickEdit, it was the simple fact that no one called me back about purchasing a license. I contacted the company and they said I had to verify my status as a student, which I was fine with, so I sent them what they asked for and got an email saying I’d get a call the next day. Well, that call never came.

I sent them another email and still no response. I called and emailed them several times over my course of talking to them and I just got to the point where I was sick of dealing with it.

6 08 2009
Nick

I love and [ab]use Sublime myself but was just wondering about Slick. It seems extremely expensive so would like to know more about it; is it worth the 300? Looking forward to your ST review ( I like the rest of your blog 2 btw )

6 08 2009
samkerr

Thanks for the compliment!

I’m not sure about the full $300 (actually it’d be more like $700 for me since I use Mac, Linux, and Windows), but since I’m a student, I would have been looking at around $60-$80, which I think is much more reasonable. Otherwise, I don’t think I would have paid full price.

7 08 2009
samkerr

For those of you who have finished reading this post, I wrote a follow-up review of Sublime Text, available at: http://samkerr.wordpress.com/2009/08/07/who-would-have-thought-sublime-text-was-so-well-sublime/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




Follow

Get every new post delivered to your Inbox.

%d bloggers like this: