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

Default Keys ​

Every default key, by mode. Use your browser's search (or the search box above) to find one fast.

INFO

Keys with a ✓ in the Kitty column require the kitty keyboard protocol, auto-detected at startup on supported terminals. See Terminal compatibility. Legacy terminal encodings cannot transmit those key combinations, so the bindings are unavailable there.

Normal mode ​

Movement ​

KeyCommandKittyAction
h / ←move-leftMove left one grapheme
l / →move-rightMove right one grapheme
j / ↓move-downMove down one visual line
k / ↑move-upMove up one visual line
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-forward (legacy) / pane-focus-next (kitty)Jump list forward (under kitty, Tab focuses the next pane instead)
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 never leave 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 prefix 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-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 iselect-last-insertionSelect the text typed during the last insert
m mselect-wordSelect the word under the cursor (plus one adjacent whitespace run by default, same rule as w/b; see word-selects-whitespace)
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

Editing ​

KeyCommandKittyAction
ddeleteDelete selection (to kill ring)
cchangeChange (delete + Insert mode)
yyankYank (clipboard + kill ring)
psmart-paste-afterSmart-paste after. See Copy & Paste
Psmart-paste-beforeSmart-paste before
[ / ]paste-ring-older / paste-ring-newerCycle kill ring older / newer and re-paste (only after a p/P)
r + charreplaceReplace every selected character (line endings are left alone). Enter/Tab count as the character, replacing 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
uundoUndo
U / Ctrl-rredoRedo
.repeat-last-actionRepeat last editing action

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 command mode prompt
/search-forwardSearch forward
?search-backwardSearch backward. Ctrl-? (kitty) extends the selection to the match
ssift-withinSift within (narrow 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

Numbered registers are shared between macros and yanked text: last write wins. Recording is ignored in read-only buffers and during replay.

See Register prefix for the full register list.

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. Every one names a destination: a place in the buffer, or (for the structural pairs) the next/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

The structural pairs need a grammar with a textobjects.scm. See Moving Around.

core:lsp adds g d, g D, g y, and g i (definition, declaration, type definition, implementation), g n/g p (next/previous diagnostic), and K (hover) outside the prefix. See Language Servers.

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 U/G C differ from g U/g C (previous unit test / previous comment) only in the prefix's case. core:lsp adds G R here for lsp/rename (see Language Servers).

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

k is up and j is down, the same axis the motion keys use. core:pickers and core:lsp add more keys under z. See Fuzzy Finder and Language Servers.

Pane prefix (Ctrl-p) ​

Press Ctrl-p then a second key:

KeyCommandKittyAction
Ctrl-p ppane-focus-nextFocus next 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)
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
Tabpane-focus-next✓Focus next 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 / end
Tab—Insert tab (literal \t, or spaces to the next tab stop when tab-style = 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 (a language server's, say; see Language servers)
Any other character—Insert character (auto-pairs aware)

Insert mode handles auto-pair insertion: typing (, [, {, ", ', or ` inserts the matching close character. Backspace inside an empty pair deletes both characters. A quote typed right after the same quote is inserted on its own, so ``` and """ come out as typed.

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 beside the menu shows the highlighted entry's details and documentation, when it has any and there is room to the right or left of the menu; with no room, the details show in the menu. Turn it off with :set global completion-docs=false, and the details show in the menu instead.

Rebinding one of these keys replaces its behaviour outright. A plugin command can fall back to it with insert-key! (see Editing & navigation), letting a binding decide per keypress whether to override the key or leave it as-is.

Extend mode ​

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

The status bar shows EXT in Extend mode.

Command line ​

KeyAction
Enter (empty input)Close the command mode 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, dismiss the command mode prompt
Ctrl-wDelete word before cursor

Search mode ​

Entered with / (forward) or ? (backward). Every keystroke live-previews the next match from the position where search was opened.

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 ​

Entered with s from Normal mode (requires at least one selection wider than a single character). Live-previews sub-match selections within the original selections. Does not overwrite the search register, so n/N continue the prior search after Enter.

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)

Released under the MIT License.