๐Ÿงฌโ—†ฦ’ 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)
    • 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)
  • Map Undo/Cut/Copy/Paste to the more usual (to some) zxcv and redo 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)
  • 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)
1

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)

Colors: Move Select Change Other
| Key Modifier Labels | Key Example|

๐Ÿ”— Helix Keymap ZXCV

@KeyboardLayoutEditor, image, config

๐•’โ‡‹๐”ธ
๐”ธ๐•’
๐•’๐”ธ
` ~
๐Ÿข”
1
โŽ—
1 !
๐Ÿข–
2
โŽ˜
2 @
3
โŽ—ฬก
3 #
แต|
4
โŽ˜ฬก
4 $
โˆ€โ–‹
5
5 %
๐•’๐”ธ
6
6 ^
7
7 &
๐–—๐Ÿข”โ–‹
8
8 *
โŸฒ
9
9 (
โŸณ
0
0 )
โœ
โœ
- _
โ„ฑ
= +
W
ร—โญ 
w
โŒซ
W
ร—โญข
w
โŒฆ
W
w
โญ 
w
Q
W
โ˜ฐ๐Ÿ—”
w
โญฒ
w
W
W
w
โญข
w
E
๐Ÿ—˜สธ
๐Ÿ—˜
R
โˆž
T
โ†ท
โˆž
Y
โญกโค
โญฃโค
ร—
U
โโญฐ
โโคธ
ร—โˆ€
I
โญฒโŽ€
  โ˜ฐโœ
โคนโŽ€
O
โ˜ฐ๏ปฟ๐Ÿ‘๏ปฟโ‚›
โ˜ฐ๐Ÿ‘
P
โญ ยถ
โ˜ฐ[
[ {
ยถโญข
โ˜ฐ]
] }
|
|to
\ |
โ‡ช
โฎ€
โˆ€โ–‹
๐Ÿ ผโ–‹๐Ÿ พ
A
ไท–๐–—
 
๐–—โ–‹
ไท–โค
S
โŽฏ
โฎ’
D
โ‚‹
โ‚‹
F
โฎŠโŽฏ
โ˜ฐโฎŠ
G
โญฐ
โค‰
๐Ÿ–ˆ
H
โจ
๐Ÿ–ˆ
โ†
โŸฒ
J
แต๐–—
โ‡Ÿ
โ†“
๐Ÿ ท
K
ร—๐–—
โ‡ž
โ†‘
๐Ÿ ต
L
โŒ˜
โ†’
โŸณ
; :
ยฎ
๐Ÿข–๐Ÿข”
โฎ€
' "
โญกโค
โญฃโค
โŽ
ร—โˆ€
โŽŒ
โŽŒ
ร—
Z
ฮ”
๐Ÿ•ฑฮ”
ร—
โ–‹
๐Ÿ•ฑ
X
C
โคธ
โคน
โคน
V
โ†ท
B
โญฒ
โคˆ
N
โ–ถ
โ˜ฐ
โบ
M
๐Ÿข”โ—Ž
 โŠ–
๐Ÿข”โ—Ž
โ‡š
, <
โ—Ž๐Ÿข–
โŠ•
โˆž
โ‡›
. >
๐–—
//
๐–—
/ ?
โ‡ง
โ‡งโŒฅ
โŒƒ
โˆ€
โŒฅ
mods
Move Select Change Other
โ˜ฐโฃ
โฃ
โˆž
move from .
โ—Ž๐Ÿข–
move to .
โ˜ฐ๏ปฟ๐Ÿ‘๏ปฟโ‚›
make sticky
๐Ÿงฌ0.6
zxcv0.2

๐Ÿ”— Helix Keymap Default

@KeyboardLayoutEditor, image; original without icons: @KeyboardLayoutEditor, image, source

๐•’โ‡‹๐”ธ
๐”ธ๐•’
๐•’๐”ธ
`~
๐Ÿข”
๐Ÿข–
1
1!
2
2@
3
3#
แต|
4
4$
โˆ€โ–‹
5
5%
6
6^
7
7&
๐–—๐Ÿข”โ–‹
8
8*
โŸฒ
โŸฒ
9
9(
โŸณ
โŸณ
0
0)
โœ
-_
โ„ฑ
=+
BS
DEL
โบ
โ–ถ
Q
W
โ˜ฐ๐Ÿ—”
w
โญข
W
W
w
โญฒ
E
๐Ÿ—˜สธ
๐Ÿ—˜
R
โ‚‹
โ‚‹
T
Y
โ†ท
โ‡ž
โŽŒ
U
โโญฐ
โŽ˜ฬก
โโคธ
I
โญกโค
โŽ—ฬก
โญฃโค
O
โคธ
โคน
P
[{
]}
|
|to
\|
ESC
โญฒโŽ€
โŠ•
โคนโŽ€
A
ไท–๐–—
๐–—โ–‹
ไท–โค
S
โ‡Ÿ
ร—โ–‹
๐Ÿ•ฑโ–‹
D
F
โ˜ฐโฎŠ
G
โ†
H
โจ
โ†“
J
แต๐–—
ร—๐–—
โ†‘
K
โ†’
L
โŒ˜
Ensure
๐Ÿข–๐Ÿข”
โฎ€
;:
ยฎ
'"
ENTER
โ˜ฐ๏ปฟ๐Ÿ‘๏ปฟโ‚›
โ˜ฐ๐Ÿ‘
Z
โŽฏ
 โŠ–
โฎ’
X
๐Ÿ ท
๐Ÿ ต
//
ฮ”
๐Ÿ•ฑฮ”
C
๐Ÿ ผโ–‹๐Ÿ พ
V
W
w
โญ 
B
๐Ÿข”โ—Ž
โ—Ž๐Ÿข–
N
โ˜ฐ
M
โ‡š
ร—โˆ€
ร—
,<
โ‡›
โˆž
โˆž
.>
๐–—
๐–—
/?
โ‡ง
โ‡งโŒฅ
โŒƒ
โˆ€
โŒฅ
mods
Move Select Change Other
โ˜ฐโฃ
SPACE
๐Ÿงฌ0.6
Default โŒจ

๐Ÿ”— Helix Keymap Refactor

@KeyboardLayoutEditor, image; original without icons: @KeyboardLayoutEditor, image, source

๐•’โ‡‹๐”ธ
๐”ธ๐•’
`~
๐Ÿข”
1
1!
2
2@
3
3#
แต|
4
4$
โˆ€โ–‹
5
5%
๐•’๐”ธ
6
6^
7
7&
๐–—๐Ÿข”โ–‹
8
8*
โŸฒ
9
9(
โŸณ
0
0)
โœ
โ›™
-_
โ„ฑ
=+
BS
DEL
โบ
โ–ถ
Q
W
โ˜ฐ๐Ÿ—”
w
โญข
W
ร—
ร—โˆ€
E
ร—๐–—
๐Ÿ—˜
R
T
Y
โ†ท
โ‡ž
โŽŒ
U
โญฒโŽ€
โŽ˜ฬก
โโคธ
I
โญกโค
โŽ—ฬก
โญฃโค
O
โˆ€
P
โญ ยถ
[{
ยถโญข
]}
|
|to
\|
โน
ESC
Redirect
โŠ•
โฎ€
A
ไท–๐–—
๐Ÿ–ˆ
๐–—โ–‹
S
๐Ÿ•ฑ
โ‡Ÿ
ร—
โ–‹
D
F
โ˜ฐโฎŠ
G
โŸฒ
โ†
H
โจ
โจ'
โ†“
J
แต๐–—
โ†‘
K
โŸณ
ไท–โค
โ†’
L
โŒ˜
๐Ÿข–๐Ÿข”
;:
ยฎ
Jump
'"
ENTER
โ˜ฐ๏ปฟ๐Ÿ‘๏ปฟโ‚›
โ˜ฐ๐Ÿ‘
Z
โŽฏ
โŠ–
โฎ’
X
๐Ÿ ต
//
๐Ÿ ท
C
๐Ÿ ผโ–‹๐Ÿ พ
V
W
w
โญ 
B
๐Ÿข”โ—Ž
โ—Ž๐Ÿข–
N
โ›™
โ˜ฐ
M
โ‡š
โˆž
,<
โ‡›
โˆž
.>
๐–—
๐–—
/?
โ‡ง
โ‡งโŒฅ
โŒƒ
โˆ€
โŒฅ
mods
Move Select Change Other
โ˜ฐโฃ
๐Ÿงฌ0.6
RefactorโŒจ