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
| Action | Arguments/Options | Description |
|---|---|---|
close | --submit, (none) | --submit: confirm input; plain close: cancel/discard |
escape | — | Cancel the input prompt |
move | --left, --right, +n | Move cursor by n characters |
backward | — | Move cursor backward by one word |
forward | --end-of-word | Move cursor forward by one word (to end if --end-of-word) |
insert | --append | Toggle insert mode (append after cursor if --append) |
visual | — | Enter visual selection mode |
delete | --cut, --insert | Delete selection (--cut moves to clipboard; --insert replaces with clipboard) |
yank | — | Copy selected text to clipboard |
paste | --before | Paste clipboard content (before cursor if --before) |
undo | — | Undo last edit |
redo | — | Redo last undone edit |
backspace | — | Delete character before cursor |
kill | bol, eol, backward, forward | Delete to beginning of line, end of line, previous word, or next word |
help | — | Open help for the input layer |
plugin | args | Run a plugin from the input context |
noop | — | No 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.