Installation

We provide pre-built binaries on the GitHub Releases page.

OSX

TODO: brew tap

Please use a pre-built binary release for the time being.

Linux

NixOS

A flake containing the package is available in the project root. The flake can also be used to spin up a reproducible development shell for working on Helix.

Arch Linux

Binary packages are available on AUR:

Build from source

git clone --recurse-submodules --shallow-submodules -j8 https://github.com/helix-editor/helix
cd helix
cargo install --path helix-term

This will install the hx binary to $HOME/.cargo/bin.

Now copy the runtime/ directory somewhere. Helix will by default look for the runtime inside the same folder as the executable, but that can be overriden via the HELIX_RUNTIME environment variable.

Usage

Configuration

Keymap

Normal mode

Movement

KeyDescription
h, Leftmove left
j, Downmove down
k, Upmove up
l, Rightmove right
wmove next word start
bmove previous word start
emove next word end
tfind 'till next char
ffind next char
Tfind 'till previous char
Ffind previous char
^move to the start of the line
$move to the end of the line
mJump to matching bracket
PageUpMove page up
PageDownMove page down
ctrl-uMove half page up
ctrl-dMove half page down
TabSwitch to next view
ctrl-iJump forward on the jumplist TODO: conflicts tab
ctrl-oJump backward on the jumplist
vEnter select (extend) mode
gEnter goto mode
:Enter command mode
zEnter view mode
spaceEnter space mode
KShow documentation for the item under the cursor

Changes

KeyDescription
rreplace (single character change)
iInsert before selection
aInsert after selection (append)
IInsert at the start of the line
AInsert at the end of the line
oOpen new line below selection
oOpen new line above selection
uUndo change
URedo change
yYank selection
pPaste after selection
PPaste before selection
>Indent selection
<Unindent selection
=Format selection
dDelete selection
cChange selection (delete and enter insert mode)

Selection manipulation

KeyDescription
sSelect all regex matches inside selections
SSplit selection into subselections on regex matches
alt-sSplit selection on newlines
;Collapse selection onto a single cursor
alt-;Flip selection cursor and anchor
%Select entire file
xSelect current line
XExtend to next line
[Expand selection to parent syntax node TODO: pick a key
Jjoin lines inside selection
Kkeep selections matching the regex TODO: overlapped by hover help
spacekeep only the primary selection TODO: overlapped by space mode
ctrl-cComment/uncomment the selections

TODO: The search implementation isn't ideal yet -- we don't support searching in reverse, or searching via smartcase.

KeyDescription
/Search for regex pattern
nSelect next search match
NAdd next search match to selection
*Use current selection as the search pattern

Select / extend mode

I'm still pondering whether to keep this mode or not. It changes movement commands to extend the existing selection instead of replacing it.

NOTE: It's a bit confusing at the moment because extend hasn't been implemented for all movement commands yet.

View mode

View mode is intended for scrolling and manipulating the view without changing the selection.

KeyDescription
z , cVertically center the line
tAlign the line to the top of the screen
bAlign the line to the bottom of the screen
mAlign the line to the middle of the screen (horizontally)
jScroll the view downwards
kScroll the view upwards

Goto mode

Jumps to various locations.

NOTE: Some of these features are only available with the LSP present.

KeyDescription
gGo to the start of the file
eGo to the end of the file
dGo to definition
tGo to type definition
rGo to references
iGo to implementation

Object mode

TODO: Mappings for selecting syntax nodes (a superset of [).

Space mode

This layer is a kludge of mappings I had under leader key in neovim.

KeyDescription
fOpen file picker
bOpen buffer picker
vOpen a new vertical split into the current file
wSave changes to file
cClose the current split
spaceKeep primary selection TODO: it's here because space mode replaced it

Hooks