Zed is the Future?

"Zed is a next-generation code editor designed for high-performance collaboration with humans and AI."

I find this description from Zed's front-page very appealing and have been trying out the editor on and off for a few months now.

So far, collaboration features have made it a tool of choice for mentoring and pair programming within my team. However, every time I considered a full switch for all my other editor use-cases, I lacked some critical features (see below) from my Neovim+Tmux setup polished over the last 15 years.

This time around, I have a good chunk of spare time between projects for sharpening my proverbial axe and I'm ready to sacrifice some productivity in the short-term to improve my habits. So I decided to give Zed another try and this time learn to do things 'The Zed Way'.

Moreover, I acknowledge that Zed is still under very active development and it will likely be that way for quite some time. So rather than evaluating it at this point in time, I'm interested to understand its long-term potential by learning more about foundations it is built upon, third-party extension tooling and the team and community behind it.

I also just want to play around with Zed's codebase and try to implement the features I need myself, as I have never worked on an editor before :)

To start off, here are some features that I currently miss:

  • Faster navigation within a buffer page - I use EasyMotion/flash.nvim heavily to navigate within a single screen
  • Navigation between buffers - I use Telescope to switch between buffers and am still trying to get used to the mental model of Zed's tabs
  • More interactive search - I regularly search through hundreds of files with Telescope/FZF when I explore a new codebase
  • Persistent terminal sessions - I often develop on a remote server and rely on Tmux to have my workspace in the always-ready state
  • Keybinding discoverability - I struggle to find the necessary Zed keybindings (something like which-key.nvim could help?)

I plan to document my experience tweaking and hacking on Zed over the next few months in this blog.

Bad muscle memory

When we say "muscle memory", we usually mean it in a positive way - something that you've learned to do so well, you don't need to think about it. Today, though, I want to talk about the bad muscle memory - habits that are automatic, but actually are unproductive and prevent further improvement. The scary part about bad muscle memory is that it can be very hard to notice and correct.

I recently switched to a new keyboard, first to Keyboardio Atreus and now to ZSA Voyager. Because these keyboards are much smaller, often only with 40% of the keys of a regular keyboard, I had to learn new positions for many keys. Moreover, these keyboards are fully programmable and encourage you to change the layout for your comfort. As I embraced the idea of tweaking the key positions on a whim, I came to a shocking realization that my most used keys are in terrible positions and I'm completely oblivious of this.

Take for example the Enter and Backspace keys. They are used all the time in the regular typing, yet pressing them requires a really uncomfortable stretching hand movement. Similarly, I rely on many keyboard shortcuts that use modifier keys such as Shift, Ctrl or Alt, and they are pressed with the weakest finger - the pinky.

Once I moved these keys to more comfortable positions and to stronger fingers, it was a strict improvement and I can't imagine going back. Moreover, I was able to replicate most of the gains of the new layout on my laptop with kmonad without any additional hardware. So the problem was really in my head and habits.

This got me thinking, how many other things in my workflow and life are like this, and how do I go about discovering and correcting such bad muscle memory?

The approach that have been working for me so far is to regularly try new things and get out of the comfort zone, for example:

  • Write Advent of Code in the unfamiliar programming language like Zig
  • Try using a new code editor Zed instead of the familiar Neovim
  • Learn a new Graphite keyboard layout instead of QWERTY

These exercises slow me down enough to start noticing my bad habits and motivate me to find ways to correct them.

I'm sure there are many more ways to achieve the same effect, let me know what works for you!