Default keybindings

All of cy's default key bindings use actions defined in the global scope and therefore are easy to rebind should you so desire. For example, to assign action/command-palette to another key sequence:

(key/bind :root ["ctrl+b" "p"] action/command-palette)

Global

These bindings apply everywhere and can always be invoked.

Prefixed

All of the bindings in this table are prefixed by ctrl+a by default. You can change the prefix for cy's bindings using key/remap.

General

SequenceActionDescription
Faction/choose-frameChoose a frame.
ctrl+paction/command-paletteOpen the command palette.
ctrl+raction/ctrl-rFind a recent command and insert it into the current shell.
daction/detachDetach from the cy server.
qaction/kill-serverKill the cy server.
paction/open-replayEnter replay mode for the current pane.
Paction/pasteInsert the contents of the default register.
raction/reload-configReload the cy configuration.
Saction/search-borgSearch all recorded .borg files for a pattern.
" re:[a-zA-Z0-9+] pregister/insertInsert the contents of the given register in the current pane.

Panes

SequenceActionDescription
Caction/jump-commandJump to the output of a command.
faction/jump-history-commandFind a command and open its .borg file.
;action/jump-paneJump to a pane.
caction/jump-pane-commandJump to a pane based on a command.
kaction/jump-projectJump to a project.
:action/jump-screen-linesJump to a pane based on screen lines.
laction/jump-shellJump to a shell.
xaction/kill-and-reattachRemove the current pane from the node tree and attach to a new one.
Xaction/kill-layout-paneRemove the current pane from the layout and the node tree.
Jaction/move-downMove down to the next pane.
downaction/move-downMove down to the next pane.
Haction/move-leftMove left to the next pane.
leftaction/move-leftMove left to the next pane.
Laction/move-rightMove right to the next pane.
rightaction/move-rightMove right to the next pane.
upaction/move-upMove up to the next pane.
Kaction/move-upMove up to the next pane.
naction/new-projectCreate a new project.
jaction/new-shellCreate a new shell.
taction/new-tabCreate a new tab.
tabaction/next-tabSwitch to the next tab.
shift+tabaction/prev-tabSwitch to the previous tab.
Raction/rename-tabRename the current tab.
-action/split-downSplit the current pane downwards.
|action/split-rightSplit the current pane to the right.
ctrl+opane/history-backwardMove backward in the pane history. Works in a similar way to vim's ctrl+o.

Viewport

SequenceActionDescription
2action/margins-160Set size to 160 columns.
1action/margins-80Set margins size to 80 columns.
gaction/toggle-marginsToggle the screen's margins.

Unprefixed

These bindings are not prefixed by ctrl+a.

SequenceActionDescription
ctrl+laction/next-paneMove to the next sibling pane.

Fuzzy finding

input/find has several key bindings that are not yet configurable, but are worth documenting.

SequenceDescription
ctrl+k or upMove up one option.
ctrl+j or downMove down one option.
enterChoose the option under the cursor.
ctrl+c or escQuit without choosing.
homeJump to the top of the list.
endJump to the bottom of the list.
pgupMove upwards by a single page.
pgdownMove downwards by a single page.

Replay mode

The actions found in the tables below are only valid in a pane that is in replay mode. Replay mode uses two isolated binding scopes that can be accessed by providing :time (for time mode) or :copy (for copy mode) to a key/bind call:

(defn do-something [] )
(key/bind :time ["ctrl+b"] do-something)

Time mode

SequenceActionDescription
1action/replay-playback-1xSet the playback rate to 1x real time.
2action/replay-playback-2xSet the playback rate to 2x real time.
3action/replay-playback-5xSet the playback rate to 5x real time.
!action/replay-playback-reverse-1xSet the playback rate to -1x real time (backwards).
@action/replay-playback-reverse-2xSet the playback rate to -2x real time (backwards).
#action/replay-playback-reverse-5xSet the playback rate to -5x real time (backwards).
g greplay/beginningGo to the beginning of the time range (in time mode) or the first line of the screen (in copy mode).
[ creplay/command-backwardIn time mode, jump to the moment in time just before the previous command was executed. In copy mode, move the cursor to the first character of the previous command that was executed.
] creplay/command-forwardIn time mode, jump to the moment in time just before the next command was executed. In copy mode, move the cursor to the first character of the next command.
Greplay/endGo to the end of the time range (in time mode) or the last line of the screen (in copy mode).
ctrl+creplay/quitQuit replay mode.
qreplay/quitQuit replay mode.
escreplay/quitQuit replay mode.
nreplay/search-againGo to the next match in the direction of the last search.
?replay/search-backwardSearch for a string backwards in time (in time mode) or in the scrollback buffer (in copy mode).
/replay/search-forwardSearch for a string forwards in time (in time mode) or in the scrollback buffer (in copy mode).
Nreplay/search-reverseGo to the previous match in the direction of the last search.
spacereplay/time-playToggle playback.
leftreplay/time-step-backStep one event backward in time.
rightreplay/time-step-forwardStep one event forward in time.

Copy mode

Copy mode is entered from time mode by triggering any form of movement, whether that be scrolling or manipulating the cursor.

SequenceActionDescription
" re:[a-zA-Z0-9] yreplay/copyYank the selection into the copy buffer.
" + yreplay/copy-clipboardYank the selection into the system clipboard.
yreplay/copy-defaultYank the selection into the default register.
vreplay/selectEnter visual select mode.

Movements

Movements in copy mode are intended to be as close to vim as possible, but many more will be added over time.

SequenceActionDescription
g greplay/beginningGo to the beginning of the time range (in time mode) or the first line of the screen (in copy mode).
Breplay/big-word-backwardMove to the beginning of the previous WORD. Equivalent to vim's B.
g Ereplay/big-word-end-backwardMove to the end of the previous WORD. Equivalent to vim's gE.
Ereplay/big-word-end-forwardMove to the end of the next WORD. Equivalent to vim's E.
Wreplay/big-word-forwardMove to the beginning of the next WORD. Equivalent to vim's W.
[ creplay/command-backwardIn time mode, jump to the moment in time just before the previous command was executed. In copy mode, move the cursor to the first character of the previous command that was executed.
] creplay/command-forwardIn time mode, jump to the moment in time just before the next command was executed. In copy mode, move the cursor to the first character of the next command.
[ Creplay/command-select-backwardMove the cursor to the first character of the output of the previous command and select its output.
] Creplay/command-select-forwardMove the cursor to the first character of the output of the next command and select its output.
jreplay/cursor-downMove cursor down one cell.
ctrl+hreplay/cursor-leftMove cursor left one cell.
hreplay/cursor-leftMove cursor left one cell.
backspacereplay/cursor-leftMove cursor left one cell.
leftreplay/cursor-leftMove cursor left one cell.
lreplay/cursor-rightMove cursor right one cell.
rightreplay/cursor-rightMove cursor right one cell.
spacereplay/cursor-rightMove cursor right one cell.
kreplay/cursor-upMove cursor up one cell.
Greplay/endGo to the end of the time range (in time mode) or the last line of the screen (in copy mode).
$replay/end-of-lineMove to the last character of the physical line. Equivalent to vim's $.
g $replay/end-of-screen-lineMove to the end of the screen line. Equivalent to vim's g$.
^replay/first-non-blankMove to the first non-blank character of the physical line. Equivalent to vim's ^.
g ^replay/first-non-blank-screenMove to the first non-blank character of the screen line. Equivalent to vim's g^.
ctrl+dreplay/half-page-downScroll the viewport half a page (half the viewport height) down.
ctrl+ureplay/half-page-upScroll the viewport half a page (half the viewport height) up.
;replay/jump-againRepeat the last character jump.
F re:.replay/jump-backwardJump to the previous instance of char on the current line.
f re:.replay/jump-forwardJump to the next instance of char on the current line.
,replay/jump-reverseRepeat the inverse of the last character jump.
T re:.replay/jump-to-backwardJump to the cell before char after the cursor on the current line.
t re:.replay/jump-to-forwardJump to the cell before char after the cursor on the current line.
g _replay/last-non-blankMove to the last non-blank character of the physical line. Equivalent to vim's g_.
g endreplay/last-non-blank-screenMove to the last non-blank character of the screen line. Equivalent to vim's g<end>.
g Mreplay/middle-of-lineMove to the middle of the physical line. Equivalent to vim's gM.
g mreplay/middle-of-screen-lineMove to the middle of the screen line. Equivalent to vim's gm.
escreplay/quitQuit replay mode.
qreplay/quitQuit replay mode.
ctrl+creplay/quitQuit replay mode.
downreplay/scroll-downScroll the viewport one line down.
upreplay/scroll-upScroll the viewport one line up.
nreplay/search-againGo to the next match in the direction of the last search.
?replay/search-backwardSearch for a string backwards in time (in time mode) or in the scrollback buffer (in copy mode).
/replay/search-forwardSearch for a string forwards in time (in time mode) or in the scrollback buffer (in copy mode).
Nreplay/search-reverseGo to the previous match in the direction of the last search.
homereplay/start-of-lineMove to the first character of the physical line. Equivalent to vim's 0.
0replay/start-of-lineMove to the first character of the physical line. Equivalent to vim's 0.
g homereplay/start-of-screen-lineMove to the first character of the screen line. Equivalent to vim's g0.
g 0replay/start-of-screen-lineMove to the first character of the screen line. Equivalent to vim's g0.
sreplay/swap-screenSwap between the alt screen and the main screen. This allows you to return to the pane's scrollback without quitting a program that is using the alternate screen, such as vim or htop.
breplay/word-backwardMove to the beginning of the previous word. Equivalent to vim's b.
g ereplay/word-end-backwardMove to the end of the previous word. Equivalent to vim's ge.
ereplay/word-end-forwardMove to the end of the next word. Equivalent to vim's e.
wreplay/word-forwardMove to the beginning of the next word. Equivalent to vim's w.

Search mode

Search mode has its own binding scope, :search.

SequenceActionDescription
ctrl+csearch/cancelCancel the current operation or the input of a query string.
escsearch/cancelCancel the current operation or the input of a query string.
:search/focus-inputFocus search mode's input bar so you can enter a new query string.
ctrl+nsearch/nextMove to the next .borg file in the search results.
ctrl+psearch/prevMove to the previous .borg file in the search results.