Skip to main content

Input ([input]) Layer

The [input] layer manages text input prompts used for renaming files, creating new entries, filtering, searching, and cd commands.

Normal vs Insert Mode

The input layer operates in two modes:

  • Normal mode — Keys trigger actions (move, yank, delete, etc.)
  • Insert mode — Keys insert text at the cursor position

Press <Insert> or i to toggle between modes. Unless configured otherwise, input starts in insert mode.

Actions

ActionArguments/OptionsDescription
close--submit, (none)--submit: confirm input; plain close: cancel/discard
escapeCancel the input prompt
move--left, --right, +nMove cursor by n characters
backwardMove cursor backward by one word
forward--end-of-wordMove cursor forward by one word (to end if --end-of-word)
insert--appendToggle insert mode (append after cursor if --append)
visualEnter visual selection mode
delete--cut, --insertDelete selection (--cut moves to clipboard; --insert replaces with clipboard)
yankCopy selected text to clipboard
paste--beforePaste clipboard content (before cursor if --before)
undoUndo last edit
redoRedo last undone edit
backspaceDelete character before cursor
killbol, eol, backward, forwardDelete to beginning of line, end of line, previous word, or next word
helpOpen help for the input layer
pluginargsRun a plugin from the input context
noopNo operation

Example Configuration

Emacs-style bindings

[input]
prepend_keymap = [
{ on = "<C-a>", run = "move --left 0", desc = "Go to beginning" },
{ on = "<C-e>", run = "move --right 0", desc = "Go to end" },
{ on = "<C-f>", run = "move --right 1", desc = "Forward char" },
{ on = "<C-b>", run = "move --left 1", desc = "Backward char" },
{ on = "<M-f>", run = "forward", desc = "Forward word" },
{ on = "<M-b>", run = "backward", desc = "Backward word" },
{ on = "<C-k>", run = "kill eol", desc = "Kill to end" },
{ on = "<C-u>", run = "kill bol", desc = "Kill to beginning" },
{ on = "<C-w>", run = "kill backward", desc = "Kill previous word" },
{ on = "<C-y>", run = "paste", desc = "Paste from clipboard" },
]

Submit on Enter, cancel on Esc

[input]
prepend_keymap = [
{ on = "<Enter>", run = "close --submit", desc = "Submit" },
{ on = "<Esc>", run = "escape", desc = "Cancel" },
]
Mode indicator

When in normal mode, the input prompt shows a mode indicator (e.g., NORMAL). In insert mode, no indicator is shown by default. This helps distinguish which mode you're in during editing.

Kill commands

kill bol deletes everything from cursor to line start. kill eol deletes from cursor to line end. kill backward deletes the word preceding the cursor. kill forward deletes the word following the cursor.