Skip to main content

Insert Mode

In this mode, Ki functions like the usual editor, where pressing keys on the keyboard types them into the current opened file.

Completion dropdown keybindings

The following keybindings only work when the completion dropdown is opened.

KeybindingMeaning
ctrl+nNext item
ctrl+pPrevious item
ctrl+space1Use current item

GNU Readline Keybindings

Although Normal Mode is the main sauce of Ki, it also implements a subset of GNU Readline Keybindings.

I highly recommend every terminal user to learn these keybindings, as they work in almost every terminal UI (TUI) application, for example:

  • macOS native textbox
  • fish
  • bash
  • zsh
  • pgcli
  • emacs
  • mongosh

Implemented keybindings 1:

KeybindingMeaning
ctrl+bMove back a character
ctrl+fMove forward a character
ctrl+aMove to line start
ctrl+eMove to line end
ctrl+kKill line forward
ctrl+uKill line backward
ctrl+wDelete word backward
alt+backspaceDelete sub word backward

Footnotes

  1. Why not enter or tab? Because often times, you actually wanted to insert a newline or a tab, so you press esc to close the dropdown menu, but by doing so you've also escaped the Insert mode, and that is infuriating. 2