The Search for the Perfect Editor

Posted on Thu 11 August 2016 in Tools

I've been listening to a fantastic podcast lately and, as one of the final questions, the interviewer always asks his guests what is their editor of choice. I get the question on a somewhat regular basis as well, and since that podcast got me trying different editors from my usual go-tos, I thought I'd write down my reasons for my editor choices.

First, I should probably say that I prefer being a jack of all trades. Most people when hearing that think, "and master of none," therefore I must be a dilettante, dabbler, or similar. However, here's the full phrase:

Jack of all trades, master of none, though ofttimes better than master of one.

With that in mind, here are the tools I use for development.

The CLI

By experience, I'm a "vim" guy. Vim is fast, available on almost every command line, not really as hard to learn as people say, and makes you feel connected to a rich Linux tradition.

That being said, I don't use it very much these days.

As a vim user, I extolled its advantages, and eschewed "Evil Emacs" any chance I got. Of course, I didn't know how to use emacs then, so it was very easy for me to be disparaging towards it.

But as I continued in my career, I met many people whom I like and respect who were emacs users. Working with them told me that there must be something to emacs, since they were clearly not stupid, and I couldn't believe that they'd use inferior stuff for their day-to-day livelihood.

So, I learned emacs.

At least, enough to confidently use it if, say, I needed to edit a file on some emacs user's computer while helping debug. What I didn't expect was just how often I would continue to use emacs after I felt I had a sufficient amount of basic skill.

To me, what's nice about emacs is its translation to the Linux command line, and the less command. All of the navigation, word replacement, deletion, and undo are exactly the same. It made my entire Linux experience more seamless, which was something I certainly didn't expect.

Oh, and forget about "vim mode" on the command line (set -o vi). Have you used it? And you like it?? Now you're just being difficult on purpose. :)

But, by the same token, I found emacs to be too heavyweight if I want to make quick modifications to a file, or peruse something with a finer grain of control than piping to less. Vim is very useful for those occasions, particularly since I can expect it to be installed on any server to which I need to connect (well, at least I know vi will be installed, if not vim).

All of this can be summed up as: for config file editing/quick perusing, I use vim. For any more serious development/script writing, I'll use emacs (yum install emacs-nox).

The GUI

It may be helpful first to lay out the rough criteria I use when choosing an editor. For starters, I've grown to be very comfortable on the command line and feel the most in control there in terms of editing and navigation. Using a GUI is something I gladly walked away from when I "went Linux" from Windows, however Mac has helped me once-again realize the benefits of clicking buttons and dragging things for productivity instead of straight-up typing.

What do I look for? Nothing esoteric, I assure you: I want a text editor that's:

  • fast
  • cross-platform
  • open sourced
  • easy word-wrapping
  • lightly customizable
  • syntax highlighting

I think we can all agree that's not a huge or unreasonable data set. I'd consider those my baseline to feel most comfortable in an editor. (And yes, if the price is reasonable, I'm willing to pay developers for their work.)

As a reference to my experience, I've used TextMate, TextWrangler, Sublime Text, Atom, Gvim, XEmacs, KWrite, and Kate. However, I'm finding that my "power combination" is Atom and PyCharm.

Yes, PyCharm is an IDE more than an editor. However, much in the same way I use both vim and emacs for particular tasks, Atom + PyCharm are my GUI corollaries.

I tried using Atom for Python development, and while I found it very useful, PyCharm is purpose-built for that, and I just missed its features too much to switch 100%. Of course, I don't always do Python development, but when I do, I choose PyCharm.

Atom's easy customizability, plugin install system, syntax highlighting for well-known file types and languages, and being cross-platform hit every checkbox I expect from an editor.

The only criticism I have so far about Atom is the load time is a little longer than I'd like. When you're in the middle of figuring out a problem in your head and you're looking to copy/paste something to help out, those extra seconds during startup can feel like an eternity. But, you know...first world problems.

Conclusion

I will continue to keep my eye out for new editors, however for now, I'm rather content with vim, emacs, Atom, and PyCharm, and recommend you check them out as well.