Helix
Helix is a text editor run in the terminal. Helix also works in the TTY.
It is inspired by Vim and
Kakoune text editors. Helix can be run from the
terminal with the hx command. Some Linux distributions provide Helix with
the helix command. Helix’s editing philosophy is selection -> action,
prioritizing safety through text verification before specifying an action.
Installation
Because Helix is evolving quickly, the way Helix can be installed can evolve to. To see how to install Helix, follow the Helix documentation book article about installing Helix. Helix can be installed on Debian using an AppImage1. Download the official Helix AppImage from the Helix latest releases page.
First move the Helix image to a directory inside the $PATH variable:
sudo mv helix-*.AppImage /usr/local/bin/hx
Then change it to an executable using chmod:
sudo chmod +x /usr/local/bin/hx
Helix can be run now with the hx command if the /usr/local/bin/ directory is
listed in the $PATH variable.
Configuration
Helix relies on two primary configuration files: config.toml for general
configuration and languages.toml for Language Server Protocol (LSP)
configuration. Due to built-in functionality, Helix’s configurations files
are typically short. It is recommended to include the config.toml and
languages.toml files inside the dotfiles repository for backup.
| Operating System | Configuration directory |
|---|---|
| Linux, macOS | ~/.config/helix/ |
| Windows | C:\Users\<user>\%AppData%\Roaming\helix\ |
<user>is the username of the user that wants to configure Helix.
Clipboard
Helix can copy to the system clipboard with Space + y.
When running Wayland as a desktop environment, make sure to install
wl-clipboard:
sudo apt install wl-clipboard
Otherwise, when running Xorg as a desktop environment, make sure to install
xclip:
sudo apt install xclip
Find and replace
Press s to search for specific text in the selected area. After pressing Enter every instance of the target text can be replaced by pressing r and entering a new value.
Commands
- Use
:reflowto hard-wrap text at the width (configuration name = ‘rulers: []’) specified in thelanguages.tomlconfiguration file. - Helix can sort the current selection by running
:pipe sort2
Footnotes
-
At the time of writing (January 2024) this is the best way to install Helix on Debian. ↩
-
Learned from this helix issue ↩