Spacelix is Spacemacs for Helix! This project consists of two Helix configurations:
- spacemacs-compat.toml ports Spacemacs keybindings to Helix. It's useful for Spacemacs users who would like to try Helix and gradually learn new keybindings, rather than all at once.
- spacelix.toml is a Helix configuration built with
Spacemacs-style principles in mind, but it does not strive to emulate
Spacemacs. It often has shorter key sequences than
spacemacs-compat.toml
.
The remainder of this README discusses spacelix.toml
, AKA Spacelix.
The Spacelix keybindings are designed according to the following goals:
- Mnemonic: Key bindings are organized using mnemonic prefixes like b for buffer, w for window, f for file, etc…
- Consistent: Similar functionalities have the same key binding everywhere thanks to a clearly defined set of conventions.
- Safe: Spacelix avoids modifier keys (shift, ctrl) to reduce the risk of RSI.
Some of these bindings match Helix defaults, those are marked with "(default)".
SPC
SPC SPC
: Command paletteSPC a
: Code action (default)SPC b
: BuffersSPC b b
: Buffer pickerSPC b d
: Close buffer (mnemonic: "delete")SPC b D
: Force close buffer (:buffer-close!
)SPC b n
: Next bufferSPC b p
: Previous bufferSPC b r
: Reload buffer (:reload
)SPC b s
: Scratch buffer (:new
)SPC b y
: Yank buffer (select_all
,yank
)SPC b Y
: Yank buffer to system clipboard (select_all
,:clipboard-yank
)
SPC c
: Case (select mode only)SPC c c
: Toggle caseSPC c u
: UppercaseSPC c l
: Lowercase
SPC d
: Debug (default)SPC e
: ErrorsSPC e g
: Go to first errorSPC e G
: Go to last errorSPC e l
: List errors (diagnostic picker)SPC e n
: Go to next errorSPC e p
: Go to previous error
SPC f
: File pickerSPC o
: Reserved for user mappingsSPC q
: QuitSPC q a
: Quit all (:quit-all
)SPC q A
: Force quit all (:quit-all!
)SPC q c
: Quit with exit code (:cquit
)SPC q C
: Force quit with exit code (:cquit!
)SPC q q
: Quit (:quit
)SPC q Q
: Force quit (:quit!
)SPC q w
: Write and quit (:write-quit
)SPC q W
: Force write and quit (:write-quit!
)
SPC g
: Go toSPC g f
: Go to fileSPC g f a
: Go to last accessed fileSPC g f f
: Go to files in selectionSPC g f m
: Go to last modified fileSPC g f h
: Go to files in selection (horizontal split)SPC g f v
: Go to files in selection (vertical split)
SPC g d
: Go to definitionSPC g g
: Go to first line of fileSPC g G
: Go to last line of fileSPC g h
: Go to start of lineSPC g i
: Go to implementationSPC g l
: Go to end of lineSPC g m
: Go to last modificationSPC g t
: Go to top of windowSPC g b
: Go to bottom of windowSPC g c
: Go to center of windowSPC g r
: Go to referencesSPC g s
: Go to symbol definition (symbol picker)SPC g w
: Go to first non-whitespace character in lineSPC g y
: Go to type definition
SPC h
: Global searchSPC j
: JumplistSPC j j
: Open the jumplist pickerSPC j n
: Jump forward in the jumplist (mnemonic: "next")SPC j p
: Jump backward in the jumplist (mnemonic: "previous")SPC j s
: Save current selection in the jumplist
SPC s
: Save (:write
)SPC r
: Rename symbol (default)SPC w
: WindowsSPC w d
: Close window (mnemonic: "delete")SPC w h
: Go to window (left) (default)SPC w j
: Go to window (down) (default)SPC w k
: Go to window (up) (default)SPC w l
: Go to window (right) (default)SPC w o
: Close windows other than current (default)SPC w H
: Swap window (left) (default)SPC w J
: Swap window (down) (default)SPC w K
: Swap window (up) (default)SPC w L
: Swap window (right) (default)
SPC X
: HelixSPC X f
: Open configuration fileSPC X l
: Open the Helix log fileSPC X r
: Reload configurationSPC X t
: Tutor
The following key bindings are for vi
/Spacemacs-emulation purposes.
- Normal mode:
0
: Go to start of line$
: Go to end of lineH
: Go to top of windowL
: Go to bottom of windowM
: Go to center of window
- Select mode:
0
: Go to start of line$
: Go to end of lineH
: Select previous sibling
And the following are just for good measure:
- Select mode:
J
: Shrink selectionK
: Expand selectionL
: Select next siblingM
: Go to center of window
Back up your existing Helix configuration, then:
curl -L -o ~/.config/helix/config.toml https://raw.githubusercontent.com/langston-barrett/spacelix/main/src/spacelix.toml
n
means "next", preferred over "forward"p
means "previous", preferred over "backward"