๐งฌโฦ Helix modiฦew keymap โ zxcv
Helix editor keymap: zxcv
Table of contents
๐ Overview
This is a draft of a Helix keymap ZXCV (for lack of a better name) in an attempt to fix some of the vim design issues I didn't like and also match some of the common operations of the zxcv keys that I'm used to from other apps, or more specifically:
- Fix the age-old vim design flaw that required you to shift fingers from home row for cursor movement
hjkl โ jkl; - Differentiate between repeatable and single-press paired keybinds (left/right, back/forward, earlier/later etc.)
- Repeatable keybinds should be on separate adjacent keys (just like โโ) instead of being on the same key with the second operation behind a Shift'ed status. This greatly simplifies going back and forth and is way more important than mnemonics1, so:
- q/w to move by word
move_prev_word_start
/move_next_word_end
instead of b/e - z/b does
undo
/redo
instead of u/Shiftu - similarly, Shift+z/b does
earlier
/later
instead of Alt+u/Shiftu - Ctrl+,/. to
increment
/decrement
instead of Ctrl+a/x - buffer โโ navigation to Alt1/2 (
goto_previous_buffer
/goto_next_buffer
)
(using this method to navigate tabs in all other apps, and Alt is a more convenient thumb-vs-palm/pinky modifier vs. Ctrl) - jumplist โโ navigation to Alt3/4 (
jump_backward
/jump_forward
)
(or swap this with the above, 1/2 might be more convenient, but it breaks with the convention in other apps for me)
- q/w to move by word
- Single-press keybinds can remain as is โ with the opposite direction Shift'ed (e.g.,
open_below
/open_above
as you only press it once)
- Repeatable keybinds should be on separate adjacent keys (just like โโ) instead of being on the same key with the second operation behind a Shift'ed status. This greatly simplifies going back and forth and is way more important than mnemonics1, so:
- Map
Undo
/Cut
/Copy
/Paste
to the more usual (to some) zxcv andredo
to the somewhat paired b2 - Ok to use Alt when you don't need the word-jump functions (that are useful in the
Extend/Select
mode), so the multi-cursor mode uses Alt+cursor:- Altk/l to select down/up (
copy_selection_on_next_line
/copy_selection_on_prev_line
) - Altj/; to shift selection back/forward (
rotate_selections_backward
/rotate_selections_forward
) - bonus: quick selection correction without releasing the modifier with Altz (backup u) (
remove_primary_selection
) - AltShift/z (backup Alti) to undo all selection (
keep_primary_selection
) - unrelated bonus: extend by word without entering the
Extend/Select
mode with Alt+q/w/e (extend_prev_word_start
,extend_next_word_end
,extend_next_word_start
)
- Altk/l to select down/up (
- Group various inserts together (
insert_mode
/prepend_to_line
to i,append_mode
/append_to_line
to o,open_below
/open_above
to u /+Shift) - Add free-standing
half_page_up
/half_page_down
to h/n - Add
goto_line_start
/goto_line_end
to Shift+h/n - Add a few keybinds to make it similar to non-modal editors to help with transition
- Shift+/Enter Insert a new line (
open_below
/open_above
) - Ctrla Select all (
select_all
) - Ctrls Save (
:write
) - Ctrlz Undo (
undo
) - Ctrly Redo (
redo
) - Ctrlo Open (
file_picker
) - Ctrlx Cut (
yank_main_selection_to_clipboard
,delete_selection
) - Ctrlc Copy (
yank_main_selection_to_clipboard
) - Ctrlv Paste (
paste_clipboard_after
) - Alt/Ctrl+โซ/โฆ to delete a w/Word left/right (e.g.,
move_next_word_end
,delete_selection
) - CtrlPageUp/PageDown to navigate files (
goto_previous_buffer
/goto_next_buffer
)
- Shift+/Enter Insert a new line (
re. mnemonics: in such a complex keybind system such as Helix's I don't find them all that useful as they don't offer intuitive predictability due to said complexity since there are several alternatives to most of the keys, e.g., should c stand for Cut/Copy/Change/Collapse/Comment/Char/Command/Case/...?
2: this breaks the 'sticky' select_mode
as I don't know how to pass the 'sticky' option it via config, seems to be hardcoded in keymap.rs
Below are the 3 layouts โ the new ZXCV along with the current default and the proposed default refactoring ( from this comment) in an html format to make it easier to copy a function icon and search for it in another layout, though it might also be more convenient to just visually flip through the locally saved images (or open them side-by-side): ZXCV, Default, Refactor
Each layout also has a Keyboard Layout Editor link as well as the Helix config files (ZXCV and default only since the Refactor one requires additional changes in Helix to be fully implemented)
Re. the keymap format: I've decided to convert the word walls in 3 separate layout images (normal, with Ctrl, with Alt) from the official wiki to a much more compact and ultimately more readable/comparable icons (though at first they might look more cryptic, so you might need to jump back and forth between the configuration file and the layout, the configuration file also has most of these in comments to help with that)
| | Modifier key legend | Example of j |
| :- | :-----------------: | :---------------------: |
| Symbol's position match the modifier key legend
(โ
applies to all others, e.g., โ
for direction)


๐ Helix Keymap ZXCV
@KeyboardLayoutEditor, image, config
๐ Helix Keymap Default
@KeyboardLayoutEditor, image; original without icons: @KeyboardLayoutEditor, image, source
๐ Helix Keymap Refactor
@KeyboardLayoutEditor, image; original without icons: @KeyboardLayoutEditor, image, source