Default key bindings
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 cy/command-palette
to another key sequence:
(key/bind :root ["ctrl+b" "p"] cy/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 |
---|---|---|
ctrl+p | action/command-palette | Open the command palette. |
r | action/reload-config | Reload the cy configuration. |
d | cy/detach | Detach from the cy server. |
q | cy/kill-server | Kill the cy server, disconnecting all clients. |
P | cy/paste | Paste the text in the copy buffer to the current pane. |
p | cy/replay | Enter replay mode for the current pane. |
Panes
Sequence | Action | Description |
---|---|---|
C | action/jump-command | Jump to the output of a command. |
; | 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-current-pane | Kill the current pane. |
n | action/new-project | Create a new project. |
j | action/new-shell | Create a new shell. |
Viewport
Sequence | Action | Description |
---|---|---|
2 | action/margins-160 | Set size to 160 columns. |
1 | action/margins-80 | Set size to 80 columns. |
- | action/margins-bigger | Increase margins by 5 columns. |
+ | action/margins-smaller | Decrease margins by 5 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 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. |
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:
(key/bind :time ["ctrl+b"] (fn [&] (do-something)))
Time mode
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). |
[ c | replay/command-backward | In time mode, jump to the moment in time just before the last command was executed. In copy mode, move the cursor to the first character of the last 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). |
ctrl+c | replay/quit | Quit replay mode. |
esc | replay/quit | Quit replay mode. |
q | 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 |
---|---|---|
y | replay/copy | Yank the selection into the copy buffer. |
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). |
[ c | replay/command-backward | In time mode, jump to the moment in time just before the last command was executed. In copy mode, move the cursor to the first character of the last 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. |
j | replay/cursor-down | Move cursor down one cell. |
backspace | replay/cursor-left | Move cursor left one cell. |
left | replay/cursor-left | Move cursor left one cell. |
ctrl+h | replay/cursor-left | Move cursor left one cell. |
h | replay/cursor-left | Move cursor left one cell. |
right | replay/cursor-right | Move cursor right one cell. |
l | replay/cursor-right | Move cursor right one cell. |
space | 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 . |
q | replay/quit | Quit replay mode. |
ctrl+c | replay/quit | Quit replay mode. |
esc | 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. |
home | replay/start-of-line | Move to the first character of the physical line. Equivalent to vim's 0 . |
0 | 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. |