Update on Helix, the modal editor

Dec 29, 2023

Hey, look at that! Maybe my last post of the year won't be so negative after all!

In looking back through my blog, I noticed that I had quite a few tech-flavoured posts: about my Mac Mini that I was using as a pseudo-laptop, what I use instead of Google/Facebook/Amazon products, my keyboard, my vow to retry "Vim" (actually Helix), and countless posts about Julia.

I thought I was due for an update, especially on my experimentation with Helix. I don't expect my blog posts to remain relevant forever — exactly the distinction between the posts that go to the blog and the writing that goes to the front page — but it did seem kind of unsatisfying that I said I'd try again to learn a modal text editor, but then never reported back.

So how's it going?

In short, great! It's been over a year since that original blog post about Helix, and since then it has really become a comfortable part of my routine. I do so much writing: of code, of academic papers, of presentation slides. I used to write these all in a graphical text editor, except for code, for which I felt forced to use VSCode. As I complained in that previous post, though, I hated VSCode. It felt clunky and over-stuffed, with too many features that I didn't use weighing down its speed. The settings menu was overwhelming. It ate up RAM. And, most pettily of all, it was ugly.

Looking back, I was lucky to have stumbled into Helix. Though, at the time, I thought that it was basically the same as all other modal editors (like Vim or NeoVim), it actually is not. I somehow blindly stumbled into the exact modal text editor for me.

Once I got used to the concept of a modal editor and learned the keybindings, Helix quickly revealed its very intuitive nature. Unlike VSCode, it was light and pleasant. It didn't jealously hoard resources. It worked without any setup, and what configuration I did do was manageable and unintimidating. I can't stress this part enough — I always got overwhelmed in VSCode's settings menus (plural!), feeling unpleasantly defeated whenever I opened the software. Like an outfit sometimes wears a person, I felt like VSCode was running me. Getting into Helix was like getting onto a smooth on-ramp. Because Helix worked right away, I didn't have to start by reading documentation and setting it up. I started writing right away. In the meantime, I could chip away at the configuration slowly, which itself was very approachable.

By now I have Helix configured in a way that I like. My Helix configuration file is under 50 lines long (though a bit longer if you include the separate file that sets up LSP functionality). I haven't tried Kakoune or NeoVim, but based on my understanding of them, I'm not sure my return to modal editors would have been successful if I had tried with them. In particular, I've read that NeoVim takes a lot of tinkering and configuring before it works productively. I do appreciate a barebones approach that allows a user to only implement features they want (after all, I just dinged VSCode for being overbloated with unwanted features), but it isn't beginner friendly. I don't rule out tinkering with NeoVim some day, but as someone who just wanted to start using a sensible text editor for my work, I really appreciated the balance both of features and restraint that the designers of Helix obviously struck with intention.

The Helix experience has the same smooth approach when it comes to actually learning the modal keybindings. Though I read through the modal concept for a few minutes, most of what I learned came from using Helix itself. The reason I could even learn on the fly is that Helix has everything well documented inside the editor itself. There's a help menu, like the VSCode control palette, where you can search for functionality. Each function has its keybinding right there beside its description, so once you search for it enough times, you will just remember the keybinding. There are a few menus in the editor which list some common functionalities, so you don't even have to search for the most important ones. It really felt like Helix held my hand and was designed with newcomers to modal editors in mind.

That isn't to say that Helix is just for beginners. The "tutorial" parts are unintrusive if you don't want them. By now, since I know what I'm doing, I almost never interface with or see the guiderails. There are several "serious programmers" who use Helix, who I mentioned in my previous post as actually having been my inspiration for trying it out. It has lots of features that help me be much more efficient than I ever was with any other text editor. Though I'm sure some of that improvement must be attributed to modal editors in general rather than Helix specifically, let me just list a few here for now.

The one thing in Helix that really sets it apart, different most other modal editors, is its cursor-first paradigm. This aspect is paradoxicaly the one most likely to trip up those experienced with Vim. Since I don't actually know much about vanilla Vim besides the few hours in the tutorial I completed years ago at this point, I can't do a detailed comparison. I do remember that, in Vim, you had to anticipate what a change would look like before you implemented it. You need to know how many letters you want to delete, for example, before you start deleting. With Helix, you use the cursor to select the letters to delete (like in visual mode), then invoke the delete. Seeing the text on which you're about to operate is much easier and intuitive. The alternative was one thing that I found very difficult to grasp intuitively with original Vim. How am I supposed to know how many letters or words I want to count or move? I didn't think naturally that way and I didn't like having to count letters. I do acknowledge that it's probably much faster for coding, once you learn how to do it, to just type 3D rather than having to select the three characters before deleting them. Aside from not being able to do it very well fluidly, I also don't exclusively write code for my work. I write a lot of prose, both for work and for my hobbies, the text for which is much less structured by nature. I just think it would be hard to have an intuition for the number of words or letters when writing prose compared to code.

The cursor-first design really sings when it comes to multi-cursor actions. You can have multiple cursors at once, and each cursor will replicate your commands. For example, if you have a cursor on each line of a five-line file and insert, then each line with have the inserted characters. I absolutely love this ability!!! Let me illustrate with a story. When I was getting into programming more involved numerical computations, I asked a software developer friend what to do with all the arguments. Some of my functions could be parameterized by dozens of arguments. Often, multiple functions would have the same long list of arguments, since one function would call the next, and so on. Even if I wrapped the arguments in a structure, so I didn't have to call the functions with a long list of arguments, I would then have to retrieve the arguments from the structure for every single function. How much time was I going to waste typing out arguments in function defintions and function calls? Worse, how much time was I going to waste double checking these lists were consistent whenever I had to change an argument or two? It was driving me crazy. I felt like I must be doing something wrong. There was no way professional software developers were living like this!

I was disappointed.

My software engineer friend said, "Nope. You basically just write them every time. Copy and paste is your friend." Oh, my god. I don't think I'd ever felt that cheated. Of course, Helix and its multiple cursors solved the problem for me instantly and elegantly. I could just write all my function definitions and calls with empty arguments. Then, once everything was written, I could select every instance of a function call or definition, then insert all the arguments a single time. Any time I wanted to modify the arguments, same story — just select the lists all at once and edit away.

It may be a silly example, but I really can't imagine how much time something this simple has saved me. Of course, it's only one instance of many where multiple cursors have been a huge efficiency boost. (Dealing with tables in LaTeX is another common one.) What's more, it's fun! Seeing multiple cursors simultaneously typing or deleting on your screen, watching the text expand out or contract in identically all at once — it gives me an indescribable, juvenile, feeling of satisfaction.

Writing in Helix is a delight.

Helix to the moon

I have to admit, it's beautiful in a nerdy way to see all my tech posts come together to form my current Helix success story, like small tributaries that wander around without knowing the river into which they will ultimately flow. For example, I wouldn't be able to use Helix so productively if I hadn't figured out the Revise and package workflow for Julia. Revise tracks and incorporates into the REPL any changes made to an active package, which allowed me to dump VSCode definitively since I no longer needed its IDE capabilities. Being able to separate editing Julia code from running Julia code meant I could go full steam ahead with Helix as my editor and a simple terminal for the REPL.

In a similar way, now that I have a laptop, I keep my Mac Mini at the office and remote into it sometimes. Remoting into anywhere was always a huge pain because editing files from a terminal, or executing it in Julia, was such a pain. Since Helix is a terminal-based text editor, I've solved that problem as well and reinforced my love for it even more.

I admitted in my original Helix post that a big motivation for the switch was that I wnated a consistent colour scheme over all my text-based activities, notably my terminal, text editing, and note-taking with Obsidian. In particular, I no longer use Obsidian for note-taking because it suffered the same problems as VSCode, though to a lesser degree: it was clunky, burned resources, and over-featured. I was originally drawn to Obsidian because you could take notes in LaTeX and see the math right away without having to compile. A huge downside was that it used MathJax, a web-based library, to render the LaTeX. In other words, I needed an internet connection essentially at all times. Besides being inconvenient during travel, sometimes I just like to disconnect from the internet and zone in on work. Just like from VSCode, Helix has freed me from Obsidian. With its built-in LSP support, Helix can be set up to compile any LaTeX document automatically on save. Problem with LaTeX notes solved. Of course, now that Helix has basically taken over everything text-related, I have achieved my consistent colour-theming goal with ease: setting the same theme for Helix and my terminal has done the trick. What's more, in a truly full circle moment, I dropped the Tokyo Night theme and simply chose the same colours as I use on this very Neocities page!

(And it goes without saying that all work in the last year on this Neocities site has been done in Helix.)

A brief self-important reflection on Uses

It also turns out that a few statements I made on my De-Googling post are not true any more. Though I know some people have a "uses" page, that could easily solve this problem of outdated tech statements, I'm not so keen on the idea. For one, it veers pretty close into couching your personal identity, if partially, in the objects you use and consume. Though I'm not perfect, I've really been trying to rethink and avoid that impulse. Especially for tech nerds (of which I begrudgingly admit I am one), the notion of gear and software is so personally important. Don't we all know an Apple fanboy?

More importantly, though, it feels a bit soulless to just have a page listing tech that I use. If we've learned anything in the recent dramatic ramp-up of tech presence in our lives, is that technology is greatest when it facilitates human connection. That's the backbone of the indie web ethos, isn't it? When technology instead serves corporate interest, it becomes a dystopian nightmare of surveillance, advertising, and consumerism. I don't want to be part of that. If I'm going to talk about the tech I use, it will be more than a cold list of items with no meaning. I want to tell the human story: what has this tech done for my life? How do I feel about it? How does it relate to me as a person? If I don't have something personal to share about these items, what is even the point of listing them on my website? Believe me, though — since I'm a (if self-conscious) tech nerd, I never run out of personal thoughts about tech.

send a comment