You're reading docs for unreleased changes —  switch to v0.19.0.
Skip to content

Default Keys ​

Every default key, by mode. Keys inside pickers, drawers, popups and menus are under Other screens, and the keys core plugins add are under Keys added by core plugins.

INFO

Keys with a ✓ in the Kitty column need the kitty keyboard protocol, which HUME detects at startup on terminals that support it. Legacy terminal encodings can't send those key combinations, so those bindings don't work there. See Terminal compatibility.

Normal mode ​

Movement ​

KeyCommandKittyAction
h / ←move-leftMove left one grapheme
l / →move-rightMove right one grapheme
j / ↓move-downMove down one visual line; with a count, that many buffer lines
k / ↑move-upMove up one visual line; with a count, that many buffer lines
wselect-next-wordSelect next word (plus one adjacent whitespace run by default; see word-selects-whitespace)
bselect-prev-wordSelect previous word (plus one adjacent whitespace run by default)
W / Bselect-next-uppercase-word / select-prev-uppercase-wordWORD variants of w / b
Homegoto-line-startStart of line (idiomatic form is g h)
Endgoto-line-endEnd of line (idiomatic form is g l)
{goto-prev-paragraphSelect the previous paragraph
}goto-next-paragraphSelect the next paragraph
#goto-matching-pairJump to the matching bracket or tag
PageDown / PageUppage-down / page-upScroll one viewport down / up
Ctrl-d / Ctrl-uhalf-page-down / half-page-upScroll half a viewport down / up
Ctrl-ojump-backwardJump list back
Ctrl-ijump-forwardJump list forward
Tabjump-forwardJump list forward. Under the kitty protocol, Tab focuses the next pane instead (see Pane prefix)
Ctrl + a motion key, e.g. Ctrl-h/j/k/l/w/bthe motion's own command, extended✓One-shot extend of that motion. Keys with their own Ctrl binding keep it; Ctrl with a key that is not a motion does nothing

Character find ​

KeyCommandKittyAction
f + charfind-forwardFind char forward (inclusive)
F + charfind-backwardFind char backward (inclusive)
t + chartill-forwardFind char forward (exclusive: stops before)
T + chartill-backwardFind char backward (exclusive: stops after)
=repeat-find-forwardRepeat last find forward
-repeat-find-backwardRepeat last find backward

After f/F/t/T, HUME waits for the target character. Tab counts as a target character; a line ending never does, since these motions stay on the current line.

Selection ​

KeyCommandKittyAction
etoggle-extendToggle Extend mode
;collapse-and-exit-extendCollapse to head, exit Extend
Ctrl-;collapse-to-anchor-and-exit-extend✓Collapse to anchor, exit Extend
Ctrl-eflip-selectionsSwap anchor and head
%select-allSelect entire buffer
xselect-lineSelect current line (forward)
Xselect-line-backwardSelect current line (backward)
Ctrl-xselect-line (extend)Same as x but always extends
Ctrl-Shift-xselect-line-backward (extend)✓Same as X but always extends
Ssplit-selection-on-newlinesSplit multi-line selections on newlines
Ccopy-selection-on-next-lineCopy each selection one selection-height down (a count adds that many copies, e.g. 3C)
_trim-selection-whitespaceShrink each selection to exclude leading/trailing whitespace (text unchanged)
,keep-primary-selectionKeep only the primary selection
Ctrl-,remove-primary-selection✓Remove primary, promote next
( / )cycle-primary-backward / cycle-primary-forwardCycle primary backward / forward
*search-word-under-cursorSearch the whole word under the cursor

Text objects (use the m prefix):

SequenceCommandKittyAction
m i w / m a winner-word / around-wordInner / around word
m i W / m a Winner-uppercase-word / around-uppercase-wordInner / around WORD
m i ( / m a (inner-paren / around-parenInner / around () (also ))
m i [ / m a [inner-bracket / around-bracketInner / around [] (also ])
m i { / m a {inner-brace / around-braceInner / around {} (also })
m i < / m a <inner-angle / around-angleInner / around <> (also >)
m i " / m a "inner-double-quote / around-double-quoteInner / around "…"
m i ' / m a 'inner-single-quote / around-single-quoteInner / around '…'
m i ` / m a `inner-backtick / around-backtickInner / around `…`
m i a / m a ainner-argument / around-argumentInner / around argument (structure-aware)
m i l / m a linner-line / around-lineInner / around line
m i p / m a pinner-paragraph / around-paragraphInner / around paragraph
m i f / m a finner-function / around-functionInner / around function
m i t / m a tinner-class / around-classInner / around class or type
m i c / m a cinner-comment / around-commentInner / around comment
m i u / m a uinner-test / around-testInner / around unit test
m i v / m a vinner-value / around-valueInner / around array/tuple/struct value
m i x / m a xinner-tag / around-tagInner / around tag pair (structure-aware)
m i iselect-last-insertionSelect the text typed during the last insert
m mselect-wordSelect the word under the cursor, with the same whitespace rule as w/b
M Mselect-uppercase-wordWORD variant of m m
m s + charsurround-paren (and other surround-* delimiters)Select surrounding delimiter pair
m w + charsurround-addWrap each selection with a delimiter pair
m /select-all-matchesTurn all search matches in the buffer into selections
m uundo-selection-changeGo back to the selections last built, then to earlier ones
m Uredo-selection-changeGo forward through the selections m u stepped back over

Editing ​

KeyCommandKittyAction
ddeleteDelete selection (to kill ring)
cchangeChange (delete + Insert mode)
yyankYank (clipboard + kill ring)
psmart-paste-afterPaste after (smart paste). See Copy & Paste
Psmart-paste-beforePaste before (smart paste)
[ / ]paste-ring-older / paste-ring-newerCycle kill ring older / newer and re-paste (only after a p/P)
r + charreplaceReplace every selected character except line endings. Enter/Tab replace with a newline/tab
Jjoin-lines-select-spacesJoin the selected lines into one
&align-selectionsAlign selections into a column
>indentIndent lines touched by a selection
<unindentUnindent lines touched by a selection
Ctrl-aincrementAdd the count to the number or date at each selection. See Numbers and dates
Ctrl-sdecrementSubtract the count from the number or date at each selection
uundoUndo
U / Ctrl-rredoRedo
.repeat-last-actionRepeat last editing action
|pipeRun a shell command on each selection and replace it with the output. See Shell commands
Ctrl-ccancel-pipeStop the shell command running in this buffer and change nothing

Entering other modes ​

KeyCommandKittyAction
iinsert-at-selection-startInsert before selection
ainsert-at-selection-endInsert after selection
Iinsert-at-line-startInsert at first non-blank on line
Ainsert-at-line-endInsert at end of line
oopen-line-belowOpen new line below, insert (indented like Enter)
Oopen-line-aboveOpen new line above, insert (indented like Enter)
:command-modeOpen the : prompt
/search-forwardSearch forward
?search-backwardSearch backward. Ctrl-? (kitty) extends the selection to the match
ssift-withinNarrow each selection to its regex matches
KeyCommandKittyAction
nsearch-nextNext match
Nsearch-prevPrevious match
Ctrl-/search-selection✓Use the selected text literally as the search pattern

Macros ​

KeyCommandKittyAction
Q Q or Q q—Start recording into default register q
Q <0-9>—Start recording into a numbered register
Q (while recording)—Stop recording
q q—Replay register q
q <0-9>—Replay a numbered register
<count> q q—Replay q <count> times

Macros are stored in registers; see Macros and Register prefix.

Other ​

KeyAction
EscCancel a half-typed key sequence, count, or register/macro prompt; clear search highlights; leave Extend mode
" + regRegister prefix (0–9, k, c, b)
1–9 then [0-9]*Numeric count prefix (0 is a digit only inside a count; otherwise unbound)

Goto prefix (g) ​

Press g then a second key. Each names a destination: a place in the buffer or, for the structural pairs, the next or previous instance of a kind, selected as a whole:

KeyCommandKittyAction
g ggoto-first-lineGo to first line of buffer
g egoto-last-lineGo to last line of buffer
g hgoto-line-startGo to line start
g lgoto-line-endGo to line end
g sgoto-first-nonblankGo to first non-blank on line
g f / g Fgoto-next-function / goto-prev-functionNext/previous function
g t / g Tgoto-next-class / goto-prev-classNext/previous class or type
g a / g Agoto-next-argument / goto-prev-argumentNext/previous argument
g c / g Cgoto-next-comment / goto-prev-commentNext/previous comment
g u / g Ugoto-next-test / goto-prev-testNext/previous unit test
g v / g Vgoto-next-value / goto-prev-valueNext/previous array/tuple/struct value
g x / g Xgoto-next-tag / goto-prev-tagNext/previous tag pair

The structural pairs need a grammar that supports them, except g x/g X, which fall back to a plain-text scan. See Moving Around. core:lsp adds more keys under g; see Keys added by core plugins.

Edit prefix (G) ​

Press G then a second key. G holds edits of the selected text, where g holds gotos:

KeyCommandKittyAction
G Lmake-text-lowercaseLowercase the selection
G Umake-text-uppercaseUppercase the selection
G Cmake-text-capitalizedCapitalize each word in the selection
G Gtoggle-commentComment or uncomment the lines of each selection
G Aincrement-sequenceAdd the count to the first selection's number or date, twice the count to the second's, and so on
G Sdecrement-sequenceSubtract in the same way as G A

core:lsp adds G R (rename); see Keys added by core plugins.

View prefix (z) ​

Press z then a second key:

KeyCommandKittyAction
z ktop-view-on-cursorScroll cursor to top of screen
z zcenter-view-on-cursorCenter view on cursor
z jbottom-view-on-cursorScroll cursor to bottom of screen

core:pickers and core:lsp add more keys under z; see Keys added by core plugins.

Pane prefix (Ctrl-p) ​

Press Ctrl-p then a second key:

KeyCommandKittyAction
Ctrl-p ppane-focus-nextFocus next pane
Ctrl-p Ppane-focus-prevFocus previous pane
Ctrl-p hpane-focus-leftFocus pane to the left
Ctrl-p jpane-focus-downFocus pane below
Ctrl-p kpane-focus-upFocus pane above
Ctrl-p lpane-focus-rightFocus pane to the right
Ctrl-p spane-splitSplit the focused pane, stacking the new pane below it
Ctrl-p vpane-vsplitSplit the focused pane side by side
Ctrl-p cpane-closeClose the focused pane (does nothing if it's the only pane, and refuses while a | run from it is running)
Ctrl-p rpane-rotate-forwardMove each pane in the focused pane's row or column one place right or down (that many places with a count); the last one wraps to the first
Ctrl-p Rpane-rotate-backwardMove each pane in the focused pane's row or column one place left or up (that many places with a count); the first one wraps to the last
Ctrl-p tgoto-next-tabSwitch to the next tab in display order
Ctrl-p Tgoto-prev-tabSwitch to the previous tab in display order

Under the kitty protocol, two keys also move focus without the prefix:

KeyCommandKittyAction
Tabpane-focus-next✓Focus next pane
Shift-Tabpane-focus-prev✓Focus previous pane

Insert mode ​

KeyCommandKittyAction
Esc / Ctrl-cexit-insertReturn to Normal mode
← / → / ↑ / ↓move-left / move-right / move-up / move-downMove cursor
Home / Endgoto-line-start / goto-line-endGo to line start / past the last character
Tab—Insert a tab (a literal tab, or spaces to the next tab stop when indent-style is soft)
Backspace—Delete character before cursor; snaps to previous tab stop when in leading whitespace (auto-pairs aware)
Delete—Delete character under cursor
Enter—Insert newline, indented as described in Indentation
Ctrl-wdelete-word-backwardDelete word before cursor
Ctrl-Spacecompletion-triggerShow completions at the cursor from every registered completion source, such as a language server (see Language servers)
Ctrl-rinsert-registerInsert the register named by the next key, or the file's path (f) or directory (p); see Inserting a register while typing
Ctrl-|pipe✓Run a shell command and insert its output at each cursor; see Shell commands
Any other character—Insert character (auto-pairs aware)

Typing an opening bracket or quote can also insert its closing character; see Auto-pairs.

While a completion menu is open, typing narrows it and these keys drive it; any other key closes it:

KeyAction
Tab / ↓Highlight the next entry
Shift-Tab / ↑Highlight the previous entry
EnterAccept the highlighted entry
EscClose the menu, stay in Insert mode
Ctrl-d / Ctrl-uScroll the documentation box down / up

A box to the right or left of the menu shows the highlighted entry's details and documentation, when it has any. When there's no room for the box, or with :set global completion-docs=false, the details show in the menu instead.

Binding one of these keys in Insert mode replaces its behaviour. A plugin command can still fall back to it; see Editing & navigation.

Extend mode ​

KeyAction
e / EscReturn to Normal mode
All other keysSame as Normal mode, but motions extend or shrink the selection

The statusline shows EXT in Extend mode.

Command mode ​

Open the : prompt with : from Normal mode.

KeyAction
Enter (empty input)Close the : prompt
Enter (non-empty)Execute command
Esc / Ctrl-cCancel
TabComplete; once the candidate list is open, pick the next candidate
Shift-TabOnce the candidate list is open, pick the previous candidate (no-op otherwise)
Up / DownRecall previous / next command starting with the typed prefix
Left / RightMove the cursor
BackspaceDelete character before cursor; on empty input, close the : prompt
Ctrl-wDelete word before cursor
Ctrl-rInsert a register, or the file's path (f) or directory (p), as in Insert mode

A key you bind in 'command mode replaces these; see Keys in the : prompt.

Search mode ​

Open it with / (forward) or ? (backward). Each keystroke previews the next match from where the search started.

KeyAction
Enter (empty input)Cancel and return to Normal
Enter (non-empty)Commit pattern to the search register, jump to first match, return to Normal
Esc / Ctrl-cCancel, restore pre-search selection
Backspace (input non-empty)Delete char and re-preview
Backspace (empties input)Restore pre-search selection, stay in Search mode
Backspace (on empty input)Exit Search mode
Ctrl-wDelete word before cursor
Up / DownRecall previous / next pattern starting with the typed prefix (separate / and ? rings)
Left / RightMove the cursor
Any other characterInsert and re-preview
Tab / Shift-TabNo-op

Sift mode ​

Open it with s from Normal mode; at least one selection must be wider than a single character. As you type, the matches inside the original selections preview as new selections. Sift mode leaves the search register alone, so after Enter, n/N continue the previous search.

KeyAction
Enter (empty input)Cancel, restore original selections
Enter (non-empty)Keep the live-preview selections, return to Normal
Esc / Ctrl-cCancel, restore original selections
Backspace (input non-empty)Delete char and re-preview
Backspace (empties input or on empty)Restore original selections, stay in Sift mode
Ctrl-wDelete word before cursor
Left / RightMove the cursor
Any other characterInsert and re-preview
Tab / Shift-Tab / Up / DownNo-op (Sift mode has no pattern history)

Other screens ​

Pickers ​

The default keys of every picker that uses core:stdlib's picker keymap, the file and buffer pickers of core:pickers included. Typing filters the list.

KeyAction
↓ / Ctrl-nSelect the next item
↑ / Ctrl-pSelect the previous item
PageDown / PageUpPage the list
Ctrl-d / Ctrl-uMove the selection by half a page
Enter / Ctrl-oOpen the selected item in the current pane
Ctrl-tOpen the selected item in a new tab
Ctrl-vOpen the selected item in a side-by-side split
Ctrl-sOpen the selected item in a stacked split
EscClose without opening anything

Drawer ​

The panel at the bottom of the screen that lists buffers (:ls), diagnostics, references and other results.

KeyAction
↓ / ↑Select the next / previous row
Ctrl-d / Ctrl-uMove the selection by half the drawer's height
EnterAct on the selected row, such as jumping to it
EscClose the drawer

Any other key works as usual, and the drawer stays open.

Popups ​

In a hover or diagnostic popup longer than its box, Ctrl-d / Ctrl-u scroll it down / up. Any other key closes the popup and then works as usual.

Menus that plugins open, such as code actions:

KeyAction
j / ↓Highlight the next entry
k / ↑Highlight the previous entry
EnterChoose the highlighted entry
EscClose without choosing

Any other key closes the menu and then works as usual.

Questions in the statusline ​

When a file you have open changes on disk, r reloads it and k keeps your version. Esc dismisses the question, which comes back the next time you enter the buffer. See External changes.

When a file you open has a crash dump, r restores the dump, d discards it and k keeps it for later. Esc keeps it. See Crash recovery.

Any other key dismisses the question and then works as usual.

Keys added by core plugins ​

These keys exist once the plugin has loaded: core:lsp's the first time a buffer gets a language, every other plugin's at startup. No core plugin loads unless your init.scm loads it. See Core Plugins.

PluginKeyAction
core:lspg d / g DGo to definition / declaration
core:lspg y / g iGo to type definition / implementation
core:lspg n / g pNext / previous diagnostic
core:lspKHover
core:lspz rReferences
core:lspz aCode actions
core:lspz s / z SDocument / workspace symbols
core:lspG RRename
core:pickersz fPick a file
core:pickersz bPick an open buffer
core:pickersz mPick a modified file in the git repository

core:vim-keybind, core:helix-surround and core:classic-paste change existing keys instead; each one's section in Core Plugins lists them.

Released under the MIT License.