Helix install - nutthawit/alpine-dotfile GitHub Wiki
Prerequisite
Installation
git clone https://github.com/helix-editor/helix ~/helix
mkdir -p ~/.config/helix/runtime
export HELIX_RUNTIME=~/.config/helix/runtime
cargo install --path ~/helix/helix-term --locked --quiet
mv -v ~/helix/runtime/* ~/.config/helix/runtime/
# Bringing environment variables, EDITOR, and aliases into scope
source /etc/ashrc
# Verify 1
echo $EDITOR
# Output should be
hx
# Verify 2
vi --version
# Output should print
helix 25.07.1 (bfcbef10)
# Verify 3
echo $HELIX_RUNTIME
# Output should be
~/.config/helix/runtime
Configuration
Apply Helix configurations
stow -v helix
Usage
Replacing the Default System Editor (vi) with Helix (hx)
This set of commands reconfigures the system to use the modern Helix editor (hx) whenever the user invokes the traditional vi command.
# Symlink the original vi to vi-old
doas ln -sf /bin/busybox /usr/bin/vi-old
# Make hx accessible to the root user
doas ln -sf /home/tie/.cargo/bin/hx /usr/local/bin/hx
# Allow hx to be used with doas
doas ln -sf /usr/local/bin/hx /usr/bin/vi