Skip to main content

Comparisons with other modal editors

AspectKiVim/NeovimHelix
Mental modelSelection mode → Movement → ActionAction → MovementMovement → Action
Structural editingFirst-classWith pluginSecond class1
Multi-cursorGoodWith pluginExtensive
Built-in file explorerYesYes (but buggy)No
Built-in LSPYesRequire configYes
Built-in global search & replaceYesRequire configNo global replace
PerformanceGoodGreatFastest
Keybindings coherenceHighLowLow
GNU Readline SupportEverywhere 2MinimalInconsistent 3

Keybindings coherence

Coherence means the quality of being logical and consistent.

Ki keybindings are exceptionally coherent due to its mental model.

The following table demonstrates the incoherence of Vim keybindings:

Selection mode / ActionNextPrevious
Worde / wb
Long wordE / WB
Search matchesnN
Linejk
Columnlh
Paragraph (empty lines)}{
Git hunk 4]c[c
One characterf/tF/T
Repeat latest f/t motion;,
Quickfix:cnext:cprev
Search current word*#

The following table demonstrates the incoherence of Helix keybindings 5:

Selection mode / ActionNextPrevious
Sibling nodealt+nalt+p
Add cursor (line-wise)Calt+c
Extend linexNone
LSP Diagnostics]d[d

As you can see, there's no single logical categorization for these keymaps, they are either lowercase-uppercase, normal-alt, left-right bracket, or outright unexplainable.

In Ki, all of these boil down to h and l only!

Ok, how is this possible? It's possible because you have to choose your selection mode first before you move.

For example:

  1. If you want to move to the next word, you enter the Word selection mode (by pressing w) first before pressing l (move to next selection).
  2. If you want to move to the next line, you enter the Line selection mode (by pressing e) first before pressing l

You only have to memorize the movement keybindings once, and then the selection mode keybindings, and you will be able to explore new ways of navigation on your own.

Once you've learned the Ki keybindings, it's tough to look back (at least for me).

Note that the Ki keybindings cannot be simply implemented in Vim/Helix via key- remapping, due to the lack of the concept of Selelection Mode, and implementing that requires major architectural changes in the core.

Footnotes

  1. The default keybindings for structural navigation in Helix are hard to access: alt+n, alt+p, alt+i and alt+o. Also, there's no easy way to revert to previous selection, which is crucial for structural manipulation.

  2. Not all GNU Readline keybindings are implemented, but they are welcomed.

  3. Extensive support in Prompt, but minimal support in Editor.

  4. With vim-unimpaired.

  5. Keybindings inherited from Vim are omitted.