Cessen's Ramblings

2014 - 10 - 27

Zed: a Code Editor

I like to write code. And like many such people, I am constantly in search of the perfect code editor. Of course, such a tool does not actually exist. But nevertheless, from time to time I like to try new editors that seem to present something new and interesting, to see if I can improve my code editing experience.

Most recently, over the last year or so, I've been playing with editors built on top of web technology. Specifically, I've been playing with Light Table, Brackets, Atom, and Zed.

I started off with Light Table—which is a really cool and innovative project, and I certainly recommend checking it out—but I pretty quickly migrated to Brackets (which is a bit more conventional) for most of my coding.

Brackets is a really cool editor, with an obvious focus on UX concerns. The editor itself looks beautiful, and I appreciated how it eschewed tabs in favor of a simple vertical list of open documents. Despite Brackets being targeted at web development, I primarily used it for C++ coding. And it worked wonderfully. The only real complaints I had about it at the time were that its scrolling and editing were a bit laggy, and it didn't support split views. (Incidentally, it now supports split view.)

Then GitHub announced Atom, and not too long after that released it as open source. Atom has split view capabilities, and in general looked like a nice editor, so I gave it a try. Despite the split view feature, and ostensibly being better suited to non-web-development coding, I found I just didn't like it as much as Brackets. So I went back to Brackets for a while.

Then I somehow stumbled upon Zed. I don't actually recall how I found it, but I did. And boy am I glad I did.

Zed, in my opinion, is the best code editor I have ever used. It makes some really bold UX decisions:

  • There is no manual saving. The editor automatically and continuously saves your documents as you are editing. This takes some getting used to, but it's actually really fantastic. It means documents are never in a "dirty" state, and you never have to worry about saving.
  • Zed has an infinite undo stack that is preserved across editing sessions. You can close a file, close Zed, and restart your computer if you like, and when you open the file again you still have your full undo stack all the way back to the first time you edited that file. This works extremely well in combination with the continuous saving.
  • No tabs or open document lists, just quick-open short-cuts. Since documents are never unsaved, there isn't any need for an "open" set of files. The only files that are open are the files currently displayed on screen for editing. You can jump between documents easily using various short cuts.

This unique (dare I say innovative?) approach that Zed takes means that it takes some getting used to. But after using it for a few weeks, I find it really difficult to go back to other editors. Zed really smooths out the editing workflow in a way that I've never seen before, and it is quite fantastic. It really changes the feel of working with a code base. Trying to go back to other editors now feels very much like a step backwards.

Moreover, despite being built on top of web technologies, Zed is surprisingly snappy. Unlike Light Table, Brackets, and Atom—all of which feel sluggish and laggy—Zed feels almost like a native application. I have yet to experience any lag in scrolling or editing except in really egregious circumstances. Opening files is also extremely snappy for all but the largest of files.

There is plenty more to Zed than what I've outlined above. It is a project-oriented editor (you start a session by selecting a root directory for the editing session), so it is not well suited to editing individual documents. But what you gain from that is project-wide code indexing for jumping to symbol definitions, project-wide search, etc. It is a very capable code editor in general, with things like multi-cursor support, etc. And to top it all off, it's cross-platform and open source.

I forsee this being my code editor of choice for quite some time. I highly recommend checking it out.