Goodbye, Vim. I'm in love with Helix.
Oh Vim, you have been a constant in my life, but try as I might, I cannot love you the way others have. You demand incantations, arcane and obtuse, and I'll have no more of it. I'm in love with another editor. Its name is Helix. We're getting married. Goodbye, vim.
Vim-curious, but never embraced.
I've been programming off and on since the naughts, when my age was in the single digits, making silly GameMaker 5 games and modifying phpBB posting-gamification plugins. I would contort and twist those arcane ruins as best I could. I've used Notepad, GameMaker, Gedit, Eclipse, Atom, Sublime, and VSCode as my IDEs.
I first dipped my toes into Linux in ~2009, which was a gateway drug to "proper development". I fell in love with Linux while chasing performance to play Minecraft on my pathetic hand-me-down laptop. From there, I quickly learned that (1) you need to learn enough Vim to be useful for configuring files, and (2) people who like Vim become very good at Vim.
I knew of Vim's fame, but it would be many years before I saw someone using Vim. His name was Dylan, and this was 2014. Standing tall, thinkpad in his right hand, typing with his left, I saw him fly through his code with vimbindings, making edits that seemed bonkers-style.
Seeing someone code so gracefully? That appealed to me a lot. I could feel how much closer the developer was to thought, I could see how much was encoded into each keystroke. I would see vim coders again, sporadically, over the years. Much of what made me love Linux was how responsive and simple it was. It demanded so little of me. The simplicity of the terminal meant that it could all live in my head, and I could interact with it at the speed of thought. That feedback loop felt, frankly, intimate. The flow state came readily, because it required so little activation energy. It compared very favorably to the cognitive load of modern IDEs with their thousand-degrees of indirection and constant blocking loadings. I wanted to write my code, and I wanted to run it in a terminal, and I want to keep doing that until someone finds a better way.
So far, Microsoft, the Eclipse working group, and Yoyo Games have not found a better way. These dinky command-line apps and terminal-interface programs remain supreme.
But, try as I might, all my experiences with Vim were awful. There was simply too much cognitive load up-front to memorize roughly 100 different keybindings. And, as it turned out, I did very much appreciate IDE features when working on large projects in languages I didn't use often. I liked having a filepicker built-in, I liked having access to my system clipboard, I liked being able to tab-complete those paths that I remembered 50% or even 95%.
I had heard of Xi, Kakoune, etc. but I never tried them. After four years of vim-curiosity, I settled on the Micro editor for a bit, a mouse-aware terminal editor that's as simple as it gets. I can highly recommend it, as it's effectively Gedit/Notepad++/Kate/etc. for your terminal. And, as a bonus, it's really easy to install, since it's just a binary you download and place on the $PATH. (More on that later.)
But, my vim-curiosity remained. "Try NeoVim," I was told. It has much of what I was missing from Vim, but it had a heavy emphasis on custom configs. I'm a big believer in sensible defaults. If my configuration hits more than 10 lines across two files, that's a bit too much for me. But people in the NeoVim community say they spend hours configuring their setups? I can't do that. Contrary to popular belief, I think the big benefit of FOSS is the ability to go with your favorite set of defaults. Sure, there's the pre-configured NeoVim called LunarVim, but it's noticably slower than vi
or hx
, and every install I've tried was buggy from the get-go, with treesitter bugs on launch.
So, as the story goes, I was stuck with VS Code. It felt like the natural extension of Atom. But VS Code is a Microsoft product, and for decades of reasons, my trust in Microsoft remains low. Watching VSCode's insidious influence grow over the years, spreading through novice and senior developers alike, was a bit existentially concerning! It's bad enough that Microsoft controls GitHub, now they want to control every developer's dev environment too? Have we learned nothing from the years? Now we're stuck with the whole "steal every developer's code and convince orgs they need CoPilot in order to keep up" thing.
Ideological reasons aside, with VS Code's slow startup and me being constantly in the terminal, I figured it was time to find greater pastures.
I had been toying with Rust off and on since 2016, but it wasn't until early 2022 with my "linear time sorting" experiments did I discover cargo
. (I had been using rustc
manually all the time prior!) I fell in love with cargo
in many ways, but especially as a package manager (cargo install
my beloved), and later in 2022, I fell in love with the Go project caddy
as a web-server. That's when I realized a pretty powerful feature both Rust and Go share: They're both (mostly) statically linked (with only a reliance on libc by default).
Statically linked executables come at a cost: Longer compile times, larger compiled binaries, and a need to re-build whenever even one dependency has a security update. But it has a huge benefit: There's just one binary to drop into the $PATH. (Unless you're on a system that uses musl instead of libc. Sorry, Alpine users, you'll have to apk install
it.)
Anyways, the big impetus for using Helix was that I was also using Caddy... I needed a way to modify my increasingly-large Caddyfile
on my server. Micro was nice, but I wanted to learn something else, and Caddyfiles are relatively shallow and simple.
Then I heard about the "Helix" editor.
On again, off again, goodbye forever. Helix is my new best friend, forever
Helix is wonderful.
Mouse reporting like in Micro. LSP support like in NeoVim. Syntax highlighting. Multiple cursors. TUI file-picker. Buffers (aka 'tabs'). The :o
previews files and folders as you type. Menu for the register picker, buffer picker, windows, etc. Themes. All of this is built in.
But, most important compared to Vim: Helix uses visual editing, which lets you see what you're doing before you do it. I'm never surprised by the result of my actions in Helix. Combined with the excellent mouse support, this yielded a gentle learning curve.
I won't cover everything I love about Helix. Instead, I recommend Dimitri Sabadie "Phaazon"'s excellent post on Helix, Kakoune, and Vim. If you've never used Vim or Helix, here is everything you need to know to get started once you've installed it:
-
Invoke Helix with
hx
, orhx my_cool_file.rs
, -
i
to enter "insert mode", -
esc
to leave "insert mode", -
:q
to quit, and:q!
to force-quit, and -
:w
to save (write to disk).And as a mnemononic for the basic editor commands, remember "W.E.B. DuBois:"
-
w,e,b
: Move across words at a time. (w
for "next word",e
for "until end of this word", andb
for "backwards") -
.
: Repeat last action -
d
: Delete -
u
: Undo (U
to redo) -
b
:Space; b
for the buffer picker :) -
o
: Open a new line under your cursor -
i
: Insert mode -
s
: Search-and-select within selection -
:
: Enter commands.
(Mnemonics and flashcards did help me get over the hump to "getting really good at Helix.")
While Xi brands itself as the editor "for the next 20 years", but I have to say that I think Helix will really take that moniker. This is because Helix is very good. I don't think Helix will displace Vim as "that text editor preinstalled on every server ever", but I do think Helix is better on its merits than the competition. It was ten years ago I saw my friend fly through their code with Vim, like a nimble wizard. It is today that I finally don that wizard robe and hat.
It only took a few hours of practice over a week or two to go from "I know i
/esc
/:q
/:w
" to "Y'know what? 10
x
s
\.
<enter>
&
s your list".*
Seriously, Helix only took a week of some practice to learn.
I spent two hours going through hx tutor
and making flashcards, which I use with Obsidian's Spaced Repetition plugin. Then I think I've spent a cumulative three more hours using the flashcards, and a few dozen cumulative hours actually using Helix. That's what took me over the top to becoming pretty good with Helix. It really just took a week of moderate effort! I'm not a genius, and you can learn Helix too!
The only thorn on the Helix rose is in language servers, specifically C#. I'm using dotnet 6, and as far as I can tell, the best C# language server is one Microsoft makes only for VS Code. For all the nice things about C#, I'm happy to continue not using it in my day to day life.
Btw, here's my Helix ~/.config/helix/config.toml
file. The auto-format
stops configured formatters from operating on write, auto-pairs
prevents matching [brackets]
and "quotes"
and whatnot from being inserted, bufferline
shows a "tab bar" when I have multiple buffers open, indent-guides.render
renders helpful |
indicators on whitespace, cursorline
softly highlight the line my cursor is at, color-modes
uses a color-coded guide for INS
, NOR
, SEL
modes. Finally, editor.soft-wrap.enable
makes it so that lines wrap, breaking on whitespace. (Very good for writing markdown, like this post).
theme = "github_light"
[editor]
auto-format = false
auto-pairs = false
bufferline = "multiple"
indent-guides.render = true
cursorline = true
color-modes = true
soft-wrap.enable = true
I love a short configuration file.
TLDR: I've fallen in love with the Helix editor. Perhaps I'm in the honeymoon period, but I've learned more in a few weeks than I have in years of Vim, and I'm already more productive than I am in VS Code. I highly recommend it to those who have been Vim-curious.
* Regarding the 10
x
s
\.
<enter>
&
command above: 10x
performs the "select line" action 10 times, to select 10 lines. Then s
"searches in selection". We search for \.
for a literal ".", since .
is Regex for "any character". Then <enter>
finishes the selection and puts the cursor on each .
, and &
aligns the characters.
P.S. Sorry emacs people. I really never even gave it a shot.