When it comes to terminal based text editors, it is usually Vim, Emacs and Nano that get the limelight.

That doesn’t mean there are not other such text editors. Neovim, a modern enhancement to Vim, is one of many such examples.

Along the same line, I would like to introduce yet another terminal based text editor called Helix Editor.

Helix, a modern text editor written in Rust

helix editor screenshot

Helix is written in Rust and uses Tree-sitter for syntax highlighting. The developer claims that it is faster than regex highlighting because Tree-sitter parses code into syntax trees like a compiler and thus giving a lot more information about code structure.

You can track local variables, calculate indentations and manipulate selection to select syntax nodes. It is robust enough to produce results even with syntax error.

The main focus of Helix is on ‘multiple selection’. This is based on Kakoune.

The built-in language server support provides context aware completion, diagnostics and code actions.

Installing Helix on Linux

For Arch and Manjaro users, Helix is available in the AUR in two packages:

  • helix-bin: contains prebuilt binary from GitHub releases
  • helix-git: builds the master branch of this repository

As an Arch user, you probably already know how to install applications using AUR, I believe.

For other Linux distributions, you have to use Cargo. Cargo is Rust package manager. With this, you can install Rust packages. Consider it Rust equivalent to PIP of Python.

You should be able to install Cargo using your distribution’s package manager. On Ubuntu based distributions, install cargo like this:

sudo apt install cargo

Next, you clone the Helix repository:

git clone --recurse-submodules --shallow-submodules -j8 https://github.com/helix-editor/helix

Move to the cloned directory:

cd helix

And now use cargo to install Helix:

cargo install --path helix-term --features "embed_runtime"

One last step is to add the hx binary to the PATH variable so that you can run it from anywhere. This should be added to your bashrc or bash profile.

 export PATH=”$HOME/.cargo/bin:$PATH”

Now that everything is set, you should be able to use the editor by typing hx in the terminal.

You can find the keyboard shortcuts for using Helix on its documentation page:

Helix Keyboard Shortcuts

How does it compare with Vim or Neovim? I cannot say. I can use Vim for basic editing but I am not a Vim ninja. If you are someone who swears and live by Vim (or Emacs), I let you try Helix and judge it yourself.

Similar Posts