helix
Overview
Helix is a post-modern modal text editor featuring selection-first editing, multiple selections, and tree-sitter integration. It uses the selection → action model inspired by Kakoune.
Core Concepts
- Modes: Normal (navigation/editing), Insert (typing), Select/extend (making selections)
- Selection-first: Select text first, then act on it (delete, yank, change)
- Multiple selections: Edit multiple locations simultaneously
- Tree-sitter: Syntax-aware navigation and textobjects
Quick Reference
Essential Commands
# config.toml example
theme = "onedark"
[editor]
line-number = "relative"
mouse = false
auto-format = true
[keys.normal]
C-s = ":w" # Save file
g = { a = "code_action" } # Minor mode: ga triggers code action
Keybindings
| Mode | Key | Action |
|---|---|---|
| Normal | i |
Insert before selection |
| Normal | v |
Enter select mode |
| Normal | : |
Command mode |
| Normal | Space |
Space mode (pickers, LSP) |
| Normal | d |
Delete selection |
| Normal | y |
Yank (copy) selection |
| Normal | p/P |
Paste after/before |
| Normal | u/U |
Undo/Redo |
| Normal | / |
Search forward |
| Normal | n/N |
Next/Previous match |
| Normal | gd |
Go to definition |
| Normal | ]d/[d |
Next/Previous diagnostic |
Space Mode (LSP & Pickers)
Accessed via Space in normal mode:
| Key | Action |
|---|---|
f |
File picker (workspace root) |
b |
Buffer picker |
s |
Document symbol picker |
d |
Document diagnostics |
a |
Code action |
r |
Rename symbol |
k |
Hover (documentation) |
/ |
Global search |
Configuration
File Locations
- Linux/Mac:
~/.config/helix/config.toml - Windows:
%AppData%\helix\config.toml - Project-local:
.helix/config.toml(merged with global)
Language Configuration
Create languages.toml in config directory:
[[language]]
name = "rust"
language-servers = [{ name = "rust-analyzer", except-features = ["format"] }, "taplo"]
[language-server.rust-analyzer]
command = "rust-analyzer"
Common Tasks
Remapping Keys
[keys.normal]
jk = "normal_mode" # Escape insert mode with jk
C-s = ":w" # Save with Ctrl+S
[keys.insert.j]
k = "normal_mode" # Minor mode: jk exits insert
Textobjects (Tree-sitter)
ma/mi- Select around/inside textobject]f/[f- Next/previous function]d/[d- Next/previous diagnostic
Shell Integration
|- Pipe selection through command!- Insert command output before selection:pipe- Typable command for piping
See Also
references/keymap.md- Complete keybinding referencereferences/configuration.md- Detailed configuration optionsreferences/languages.md- Language server setupreferences/themes.md- Creating custom themes
More from knoopx/pi
podman
Manages containers, builds images, configures pods and networks with Podman. Use when running containers, creating Containerfiles, grouping services in pods, or managing container resources.
122jujutsu
Manages version control with Jujutsu (jj), including rebasing, conflict resolution, and Git interop. Use when tracking changes, navigating history, squashing/splitting commits, or pushing to Git remotes.
117nix-flakes
Creates reproducible builds, manages flake inputs, defines devShells, and builds packages with flake.nix. Use when initializing Nix projects, locking dependencies, or running nix build/develop commands.
54scraping
Fetches web pages, parses HTML with CSS selectors, calls REST APIs, and scrapes dynamic content. Use when extracting data from websites, querying JSON APIs, or automating browser interactions.
48jscpd
Finds duplicate code blocks and analyzes duplication metrics across files. Use when identifying copy-pasted code, measuring technical debt, or preparing for refactoring.
45yt-dlp
Downloads videos from YouTube and other sites using yt-dlp. Use when downloading videos, extracting metadata, or batch downloading multiple files.
42