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
Sequence | Action | Description |
---|---|---|
F | action/choose-frame | Choose a frame. |
ctrl+p | action/command-palette | Open the command palette. |
ctrl+r | action/ctrl-r | Find a recent command and insert it into the current shell. |
d | action/detach | Detach from the cy server. |
q | action/kill-server | Kill the cy server. |
p | action/open-replay | Enter replay mode for the current pane. |
P | action/paste | Insert the contents of the default register. |
r | action/reload-config | Reload the cy configuration. |
S | action/search-borg | Search all recorded .borg files for a pattern. |
" re:[a-zA-Z0-9+] p | register/insert | Insert the contents of the given register in the current pane. |
Panes
Sequence | Action | Description |
---|---|---|
C | action/jump-command | Jump to the output of a command. |
f | action/jump-history-command | Find a command and open its .borg file. |
; | action/jump-pane | Jump to a pane. |
c | action/jump-pane-command | Jump to a pane based on a command. |
k | action/jump-project | Jump to a project. |
: | action/jump-screen-lines | Jump to a pane based on screen lines. |
l | action/jump-shell | Jump to a shell. |
x | action/kill-and-reattach | Remove the current pane from the node tree and attach to a new one. |
X | action/kill-layout-pane | Remove the current pane from the layout and the node tree. |
J | action/move-down | Move down to the next pane. |
down | action/move-down | Move down to the next pane. |
left | action/move-left | Move left to the next pane. |
H | action/move-left | Move left to the next pane. |
L | action/move-right | Move right to the next pane. |
right | action/move-right | Move right to the next pane. |
K | action/move-up | Move up to the next pane. |
up | action/move-up | Move up to the next pane. |
n | action/new-project | Create a new project. |
j | action/new-shell | Create a new shell. |
t | action/new-tab | Create a new tab. |
tab | action/next-tab | Switch to the next tab. |
shift+tab | action/prev-tab | Switch to the previous tab. |
R | action/rename-tab | Rename the current tab. |
- | action/split-down | Split the current pane downwards. |
| | action/split-right | Split the current pane to the right. |
ctrl+o | pane/history-backward | Move backward in the pane history. Works in a similar way to vim's ctrl+o. |
Viewport
Sequence | Action | Description |
---|---|---|
2 | action/margins-160 | Set size to 160 columns. |
1 | action/margins-80 | Set margins size to 80 columns. |
g | action/toggle-margins | Toggle the screen's margins. |
Unprefixed
These bindings are not prefixed by ctrl+a.
Sequence | Action | Description |
---|---|---|
ctrl+l | action/next-pane | Move to the next sibling pane. |
Fuzzy finding
input/find has several key bindings that are not yet configurable, but are worth documenting.
Sequence | Description |
---|---|
ctrl+k or up | Move up one option. |
ctrl+j or down | Move down one option. |
enter | Choose the option under the cursor. |
ctrl+c or esc | Quit without choosing. |
home | Jump to the top of the list. |
end | Jump to the bottom of the list. |
pgup | Move upwards by a single page. |
pgdown | Move 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
Sequence | Action | Description |
---|---|---|
1 | action/replay-playback-1x | Set the playback rate to 1x real time. |
2 | action/replay-playback-2x | Set the playback rate to 2x real time. |
3 | action/replay-playback-5x | Set the playback rate to 5x real time. |
! | action/replay-playback-reverse-1x | Set the playback rate to -1x real time (backwards). |
@ | action/replay-playback-reverse-2x | Set the playback rate to -2x real time (backwards). |
# | action/replay-playback-reverse-5x | Set the playback rate to -5x real time (backwards). |
g g | replay/beginning | Go to the beginning of the time range (in time mode) or the first line of the screen (in copy mode). |
[ c | replay/command-backward | In 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. |
] c | replay/command-forward | In 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. |
G | replay/end | Go to the end of the time range (in time mode) or the last line of the screen (in copy mode). |
q | replay/quit | Quit replay mode. |
ctrl+c | replay/quit | Quit replay mode. |
esc | replay/quit | Quit replay mode. |
n | replay/search-again | Go to the next match in the direction of the last search. |
? | replay/search-backward | Search for a string backwards in time (in time mode) or in the scrollback buffer (in copy mode). |
/ | replay/search-forward | Search for a string forwards in time (in time mode) or in the scrollback buffer (in copy mode). |
N | replay/search-reverse | Go to the previous match in the direction of the last search. |
space | replay/time-play | Toggle playback. |
left | replay/time-step-back | Step one event backward in time. |
right | replay/time-step-forward | Step 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.
Sequence | Action | Description |
---|---|---|
" re:[a-zA-Z0-9] y | replay/copy | Yank the selection into the copy buffer. |
" + y | replay/copy-clipboard | Yank the selection into the system clipboard. |
y | replay/copy-default | Yank the selection into the default register. |
v | replay/select | Enter 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.
Sequence | Action | Description |
---|---|---|
g g | replay/beginning | Go to the beginning of the time range (in time mode) or the first line of the screen (in copy mode). |
B | replay/big-word-backward | Move to the beginning of the previous WORD. Equivalent to vim's B . |
g E | replay/big-word-end-backward | Move to the end of the previous WORD. Equivalent to vim's gE . |
E | replay/big-word-end-forward | Move to the end of the next WORD. Equivalent to vim's E . |
W | replay/big-word-forward | Move to the beginning of the next WORD. Equivalent to vim's W . |
[ c | replay/command-backward | In 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. |
] c | replay/command-forward | In 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. |
[ C | replay/command-select-backward | Move the cursor to the first character of the output of the previous command and select its output. |
] C | replay/command-select-forward | Move the cursor to the first character of the output of the next command and select its output. |
j | replay/cursor-down | Move cursor down one cell. |
left | replay/cursor-left | Move cursor left one cell. |
ctrl+h | replay/cursor-left | Move cursor left one cell. |
backspace | replay/cursor-left | Move cursor left one cell. |
h | replay/cursor-left | Move cursor left one cell. |
l | replay/cursor-right | Move cursor right one cell. |
space | replay/cursor-right | Move cursor right one cell. |
right | replay/cursor-right | Move cursor right one cell. |
k | replay/cursor-up | Move cursor up one cell. |
G | replay/end | Go to the end of the time range (in time mode) or the last line of the screen (in copy mode). |
$ | replay/end-of-line | Move to the last character of the physical line. Equivalent to vim's $ . |
g $ | replay/end-of-screen-line | Move to the end of the screen line. Equivalent to vim's g$ . |
^ | replay/first-non-blank | Move to the first non-blank character of the physical line. Equivalent to vim's ^ . |
g ^ | replay/first-non-blank-screen | Move to the first non-blank character of the screen line. Equivalent to vim's g^ . |
ctrl+d | replay/half-page-down | Scroll the viewport half a page (half the viewport height) down. |
ctrl+u | replay/half-page-up | Scroll the viewport half a page (half the viewport height) up. |
; | replay/jump-again | Repeat the last character jump. |
F re:. | replay/jump-backward | Jump to the previous instance of char on the current line. |
f re:. | replay/jump-forward | Jump to the next instance of char on the current line. |
, | replay/jump-reverse | Repeat the inverse of the last character jump. |
T re:. | replay/jump-to-backward | Jump to the cell before char after the cursor on the current line. |
t re:. | replay/jump-to-forward | Jump to the cell before char after the cursor on the current line. |
g _ | replay/last-non-blank | Move to the last non-blank character of the physical line. Equivalent to vim's g_ . |
g end | replay/last-non-blank-screen | Move to the last non-blank character of the screen line. Equivalent to vim's g<end> . |
g M | replay/middle-of-line | Move to the middle of the physical line. Equivalent to vim's gM . |
g m | replay/middle-of-screen-line | Move to the middle of the screen line. Equivalent to vim's gm . |
esc | replay/quit | Quit replay mode. |
ctrl+c | replay/quit | Quit replay mode. |
q | replay/quit | Quit replay mode. |
down | replay/scroll-down | Scroll the viewport one line down. |
up | replay/scroll-up | Scroll the viewport one line up. |
n | replay/search-again | Go to the next match in the direction of the last search. |
? | replay/search-backward | Search for a string backwards in time (in time mode) or in the scrollback buffer (in copy mode). |
/ | replay/search-forward | Search for a string forwards in time (in time mode) or in the scrollback buffer (in copy mode). |
N | replay/search-reverse | Go to the previous match in the direction of the last search. |
0 | replay/start-of-line | Move to the first character of the physical line. Equivalent to vim's 0 . |
home | replay/start-of-line | Move to the first character of the physical line. Equivalent to vim's 0 . |
g home | replay/start-of-screen-line | Move to the first character of the screen line. Equivalent to vim's g0 . |
g 0 | replay/start-of-screen-line | Move to the first character of the screen line. Equivalent to vim's g0 . |
s | replay/swap-screen | Swap 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. |
b | replay/word-backward | Move to the beginning of the previous word. Equivalent to vim's b . |
g e | replay/word-end-backward | Move to the end of the previous word. Equivalent to vim's ge . |
e | replay/word-end-forward | Move to the end of the next word. Equivalent to vim's e . |
w | replay/word-forward | Move to the beginning of the next word. Equivalent to vim's w . |
Search mode
Search mode has its own binding scope, :search
.
Sequence | Action | Description |
---|---|---|
ctrl+c | search/cancel | Cancel the current operation or the input of a query string. |
esc | search/cancel | Cancel the current operation or the input of a query string. |
: | search/focus-input | Focus search mode's input bar so you can enter a new query string. |
ctrl+n | search/next | Move to the next .borg file in the search results. |
ctrl+p | search/prev | Move to the previous .borg file in the search results. |