Helix Logo

I am trying out Helix as a CLI text editor. Helix is in the same vein as Neovim, but with some differences. Two differences I noticed right off between nvim and helix.

  • Many of the basic vim motions key bindings are the same in helix. However, helix has a different philosophy behind key bindings. They use a selection -> action approach for compound bindings. An example of this is to delete the word at the cursor in normal node.

    • vim: dw (delete -> word)
    • helix: wd (word -> delete)
  • Helix doesn’t currently have plugin support, but the default editor comes with a good set of feature rich default out of the box.

To get a better idea about helix, visit the Helix Website.

You will, of course, need to have helix installed on your computer. Since there are so many options based on your computer, I won’t detail that here.

Why Would You Choose Helix over Neovim?

Don’t wait to really do a comparison between helix and Neovim. They are both great editors. It really comes down to what you are familiar with and your use case. However, it is imperative that you learn your editor thoroughly since you’ll be spending so much time using it.

If you have thoroughly grokked nvim, there is no reason to switch. Especially if you have done a lot of configuration and customization to get the editor just the way you like it.

I had been looking for a command line text editor that was more powerful than nano. Vi/Vim seemed like an ideal solution for that. And then there is Neovim. It takes vim and expands its capabilities exponentially.

In my case, I was trying to learn nvim. It is a rabbit hole of configuration and plugins. If I was programming all day, every day, it would be worth the effort to master nvim. My use case is much simpler:

  • Write a lot of mark down.
  • Write some python code.
  • Do some web development (HTML, JavaScript, CSS, etc.)
  • Learn some more Golang.
  • Remote into other servers via SSH and edit config files, Docker files, etc.

So, I really didn’t need all nvim brings with its associated complexity. So, I wanted something that is powerful and provides more hand-holding starting out. So, helix seems to hit a sweet spot between complexity and usability for me.

[!Summary] The Bottom Line Whatever editing tool you use, put in the effort to learn it well.

Getting Started

A good place to start is helix’s version of vim tutor. You can start the tutor from the command line

hx --tutor

or once in helix use the :tutor command in NOR (normal) mode.

The key is your friend. When you’re lost, it gets you back to normal mode. I also like that when you start typing a command with :, the pop-up help guides you to the command you’re looking for. The leader key <space> is also useful for opening various pickers and exploring further commands.

The Escape Key

The escape key is used to get back to normal mode from the other modes in helix. A good thing to do is to remap your escape key and the caps lock key on your keyboard. This is very useful and once I got used to the swap, I really like the change.

See Swap esc and caps lock article for how to accomplish it on Linux Mint.

Ignoring unwanted folders and dotfiles

When I opened my Obsidian vault in helix and used the fuzzy finder to look for a file to open it was filled with tons of dotfiles. In some previous editors, I had previously set up a .gitignore file that eliminated those superfluous files on some other editors, but it wasn’t working here. There are several ways to approach the problem.

  1. Use git init to create an empty repository. At that point, helix honors the .gitignore file. This works well for those that use git in Obsidian vaults.
  2. The better solution for me was to just copy the .gitignore file to be .ignore. This works for any folder when not using git.
  3. In the helix/config.toml file you can add the following lines:
[editor.file-picker]
hidden = true

The downside with this option is that it will always not show the dotfiles regardless of the current working directory.

Found a nice video about that very issue.

Manage Fuzzy Finder with .ignore file

Installing Language Services

Nice thing about helix is that you generally get syntax highlighting out of the box. But, it would be super nice to get extra language specific goodies set up.

So, here are the languages / file formats I care about:

  • CSS
  • HTML
  • bash
  • go
  • Markdown
  • python

So, here are a couple of commands you want to use along with the commands that I used to install the specific language components. You will want to do some internet searching to research the installation that works for your computing environment.

# Get a list of all the supported languages and what is installed
hx --health

# See a report for a specific language
hx --health python

# This added support for css and html along with json, jsonc, and scss.
sudo npm install -g vscode-langservers-extracted

# Install for bash
brew install bash-language-server

# Install for go
# I believe I already had gopls installed previously, so didn't have to add that one.

# Install marksman and markdown-oxide for markdown
cargo install --locked --git https://github.com/Feel-ix-343/markdown-oxide.git markdown-oxide
brew install marksman

# Python
uv tool install jedi-language-server
sudo apt install python3-pylsp
# Already had ruff installed via
uv tool install ruff

The Configuration Directory

On my system the configuration file is stored in ~/.config/helix/config.toml. The nifty shortcut within helix is to type :config-open to open the config file from within the editor.

I haven’t made a ton of additions, but these are the settings I’m using at this point.

theme = "gruvbox"

[editor]
line-number = "relative"
mouse = true
text-width = 100
scrolloff = 10
bufferline = "multiple"
color-modes = true


[editor.cursor-shape]
insert = "bar"
normal = "block"
select = "underline"

[editor.file-picker]
hidden = false

[editor.soft-wrap]
enable = true
wrap-at-text-width = true

[editor.indent-guides]
render = true
# character = "|"
character = "╎" # Some characters that work well: "▏", "┆", "┊", "⸽", "╎"
skip-levels = 0

In the helix documentation, there are a ton more options, but still learning. I think additional configuration will be required to get the most out of the language handling features. So, this will grow over time.

Spell Checking

A feature that is missing from helix is spell checking. GNU Aspell can fill that gap nicely.

aspell check __filename__

This command brings up a nice interface that walks through the file allowing you to correct spelling issues and add new terms to the dictionary. Check out these Aspell examples from geeksforgeeks.org Check out these Aspell examples from geeksforgeeks.org]()

Additional References

Helix Logo

Documentation and Help

These are must read articles as you become serious about helix.

Language Server Protocol Docs

Other Tools