Tool Recommendation: Helix Editor

Posted on May 19, 2022 by Richard Goulter
Tags:

The Helix editor is a fancy new text editor which looks to be a compelling competitor to vim for modern developer environments.

Currently, my preferred editing environment is Emacs, making use of the Doom Emacs distribution.

Before that, I was using vim (and its cousin, neovim). And I still use neovim for editing files from the command line.

But, I’d heard of kakoune. Kakoune takes the “verb + text object” text navigation and manipulation of Vim, and flips it into a more user friendly direction: Kakoune opts for “text object + verb”.

This seems like it would soften the rough edges of the finer parts of vim. It’s often easier to make use of vim’s visual mode, and then copy/delete/replace that selection.

So. The Helix editor, another text editor, is interesting for a few reasons:

  1. It takes the same user-friendly “text object + verb” approach that kakoune used. (This also allows for powerful multi-cursor text manipulation).

  2. It leverages language server protocol (LSP), which enables editor integration with language compilers, allowing for code completion or quickly bringing up documentation.

  3. It leverages tree sitter. This allows different editors to share parsers for different languages, for syntax highlighting, or perhaps navigation of text objects.

So. It’s got a few fancy features, each are worth being excited about.

So I’ve given it a try.

Overall, as a vim user, trying out Helix has the following loop:

  1. Try and use Helix as if it’s vim (but swapping text object and action).

  2. Be surprised when something doesn’t work, because Helix isn’t vim, so look up the equivalent action, and remember to use the Helix keybinding.

I’d say the ‘trouble’ here is that with Vim, there’s a long tail of keybindings which you’ll use infrequently.

e.g. it took me a while to notice that Helix doesn’t open directories in a buffer. (Whereas, vim has netrw, and Emacs has dired).

Overall, Helix’s keybindings seem consistent and well thought out.

e.g. my current “rosetta stone” is:

vim mode vim helix mode helix note
0 gh
^ gs
$ gl
gq = format. TBI in helix. Vim’s = is ‘indent’.
C-v i C i Or Alt-s to split selection on newline.
C v gl c
x ;d
V X
* *n
G ge
:bprev, [b gp
:bnext, ]b gn
`. g.
H gt
M gc
L gb
C-r U redo
ga last accessed file
R replace selection with clipboard
% mm
ggVG % select entire file
,
; Alt-.
visual o Alt-;
(/) left up to tree-sitter?
{/} left up to tree-sitter?
gc Ctrl-c Evil comment
~ ~ (same in both) toggle case
gu | to lowerlase | | | gU | | Alt+ to uppercase
vi” vmi” prefix sequence with m for things.

Overall, I like what I’ve tried of Helix. It feels very polished out-of-the-box.


Newer post Older post