version 1.496, 2016/10/03 20:58:39 |
version 1.497, 2016/10/11 07:23:34 |
|
|
.Ic list-keys , |
.Ic list-keys , |
is executed from a key binding. |
is executed from a key binding. |
.Pp |
.Pp |
The keys available depend on whether emacs or vi mode is selected |
Commands are sent to copy mode using the |
(see the |
.Fl X |
|
flag to the |
|
.Ic send-keys |
|
command. |
|
When a key is pressed, copy mode automatically uses one of two key tables, |
|
depending on the |
.Ic mode-keys |
.Ic mode-keys |
option). |
option: |
The following keys are supported as appropriate for the mode: |
.Ic copy-mode |
.Bl -column "FunctionXXXXXXXXXXXXXXXXX" "viXXXXXXXXXX" "emacs" -offset indent |
for emacs, or |
.It Sy "Function" Ta Sy "vi" Ta Sy "emacs" |
.Ic copy-mode-vi |
.It Li "Append selection" Ta "A" Ta "" |
for vi. |
.It Li "Back to indentation" Ta "^" Ta "M-m" |
Key tables may be viewed with the |
.It Li "Bottom of history" Ta "G" Ta "M-<" |
.Ic list-keys |
.It Li "Clear selection" Ta "Escape" Ta "C-g" |
command. |
.It Li "Copy selection" Ta "Enter" Ta "M-w" |
.Pp |
.It Li "Copy to named buffer" Ta \&" Ta "" |
The following commands are supported in copy mode: |
.It Li "Cursor down" Ta "j" Ta "Down" |
.Bl -column "CommandXXXXXXXXXXXXXXXXX" "viXXXXXXXXXX" "emacs" -offset indent |
.It Li "Cursor left" Ta "h" Ta "Left" |
.It Sy "Command" Ta Sy "vi" Ta Sy "emacs" |
.It Li "Cursor right" Ta "l" Ta "Right" |
.It Li "append-selection" Ta "" Ta "" |
.It Li "Cursor to bottom line" Ta "L" Ta "" |
.It Li "append-selection-and-cancel" Ta "A" Ta "" |
.It Li "Cursor to middle line" Ta "M" Ta "M-r" |
.It Li "back-to-indentation" Ta "^" Ta "M-m" |
.It Li "Cursor to top line" Ta "H" Ta "M-R" |
.It Li "begin-selection" Ta "Space" Ta "C-Space" |
.It Li "Cursor up" Ta "k" Ta "Up" |
.It Li "bottom-line" Ta "L" Ta "" |
.It Li "Delete entire line" Ta "d" Ta "C-u" |
.It Li "cancel" Ta "q" Ta "Escape" |
.It Li "Delete/Copy to end of line" Ta "D" Ta "C-k" |
.It Li "clear-selection" Ta "Escape" Ta "C-g" |
.It Li "End of line" Ta "$" Ta "C-e" |
.It Li "copy-end-of-line" Ta "D" Ta "C-k" |
.It Li "Go to line" Ta ":" Ta "g" |
.It Li "copy-line" Ta "" Ta "" |
.It Li "Half page down" Ta "C-d" Ta "M-Down" |
.It Li "copy-pipe <command>" Ta "" Ta "" |
.It Li "Half page up" Ta "C-u" Ta "M-Up" |
.It Li "copy-selection" Ta "" Ta "" |
.It Li "Jump again" Ta ";" Ta ";" |
.It Li "copy-selection-and-cancel" Ta "Enter" Ta "M-w" |
.It Li "Jump again in reverse" Ta "," Ta "," |
.It Li "cursor-down" Ta "j" Ta "Down" |
.It Li "Jump backward" Ta "F" Ta "F" |
.It Li "cursor-left" Ta "h" Ta "Left" |
.It Li "Jump forward" Ta "f" Ta "f" |
.It Li "cursor-right" Ta "l" Ta "Right" |
.It Li "Jump to backward" Ta "T" Ta "" |
.It Li "cursor-up" Ta "k" Ta "Up" |
.It Li "Jump to forward" Ta "t" Ta "" |
.It Li "end-of-line" Ta "$" Ta "C-e" |
.It Li "Next page" Ta "C-f" Ta "Page down" |
.It Li "goto-line <line>" Ta ":" Ta "g" |
.It Li "Next paragraph" Ta "}" Ta "M-}" |
.It Li "halfpage-down" Ta "C-d" Ta "M-Down" |
.It Li "Next space" Ta "W" Ta "" |
.It Li "halfpage-up" Ta "C-u" Ta "M-Up" |
.It Li "Next space, end of word" Ta "E" Ta "" |
.It Li "history-bottom" Ta "G" Ta "M-<" |
.It Li "Next word" Ta "w" Ta "" |
.It Li "history-top" Ta "g" Ta "M->" |
.It Li "Next word end" Ta "e" Ta "M-f" |
.It Li "jump-again" Ta ";" Ta ";" |
.It Li "Other end of selection" Ta "o" Ta "" |
.It Li "jump-backward <to>" Ta "F" Ta "F" |
.It Li "Paste buffer" Ta "p" Ta "C-y" |
.It Li "jump-forward <to>" Ta "f" Ta "f" |
.It Li "Previous page" Ta "C-b" Ta "Page up" |
.It Li "jump-reverse" Ta "," Ta "," |
.It Li "Previous paragraph" Ta "{" Ta "M-{" |
.It Li "jump-to-backward <to>" Ta "T" Ta "" |
.It Li "Previous space" Ta "B" Ta "" |
.It Li "jump-to-forward <to>" Ta "t" Ta "" |
.It Li "Previous word" Ta "b" Ta "M-b" |
.It Li "middle-line" Ta "M" Ta "M-r" |
.It Li "Quit mode" Ta "q" Ta "Escape" |
.It Li "next-paragraph" Ta "}" Ta "M-}" |
.It Li "Rectangle toggle" Ta "v" Ta "R" |
.It Li "next-space" Ta "W" Ta "" |
.It Li "Scroll down" Ta "C-Down or C-e" Ta "C-Down" |
.It Li "next-space-end" Ta "E" Ta "" |
.It Li "Scroll up" Ta "C-Up or C-y" Ta "C-Up" |
.It Li "next-word" Ta "w" Ta "" |
.It Li "Search again" Ta "n" Ta "n" |
.It Li "next-word-end" Ta "e" Ta "M-f" |
.It Li "Search again in reverse" Ta "N" Ta "N" |
.It Li "other-end" Ta "o" Ta "" |
.It Li "Search backward" Ta "?" Ta "C-r" |
.It Li "page-down" Ta "C-f" Ta "PageDown" |
.It Li "Search forward" Ta "/" Ta "C-s" |
.It Li "page-up" Ta "C-b" Ta "PageUp" |
.It Li "Select line" Ta "V" Ta "" |
.It Li "previous-paragraph" Ta "{" Ta "M-{" |
.It Li "Start of line" Ta "0" Ta "C-a" |
.It Li "previous-space" Ta "B" Ta "" |
.It Li "Start selection" Ta "Space" Ta "C-Space" |
.It Li "previous-word" Ta "b" Ta "M-b" |
.It Li "Top of history" Ta "g" Ta "M->" |
.It Li "rectangle-toggle" Ta "v" Ta "R" |
.It Li "Transpose characters" Ta "" Ta "C-t" |
.It Li "scroll-down" Ta "C-e" Ta "C-Down" |
|
.It Li "scroll-up" Ta "C-y" Ta "C-Up" |
|
.It Li "search-again" Ta "n" Ta "n" |
|
.It Li "search-backward <for>" Ta "?" Ta "C-r" |
|
.It Li "search-forward <for>" Ta "/" Ta "C-s" |
|
.It Li "search-reverse" Ta "N" Ta "N" |
|
.It Li "select-line" Ta "V" Ta "" |
|
.It Li "start-of-line" Ta "0" Ta "C-a" |
|
.It Li "top-line" Ta "H" Ta "M-R" |
.El |
.El |
.Pp |
.Pp |
The next and previous word keys use space and the |
The next and previous word keys use space and the |
|
|
Commands in copy mode may be prefaced by an optional repeat count. |
Commands in copy mode may be prefaced by an optional repeat count. |
With vi key bindings, a prefix is entered using the number keys; with |
With vi key bindings, a prefix is entered using the number keys; with |
emacs, the Alt (meta) key and a number begins prefix entry. |
emacs, the Alt (meta) key and a number begins prefix entry. |
For example, to move the cursor forward by ten words, use |
|
.Ql M-1 0 M-f |
|
in emacs mode, and |
|
.Ql 10w |
|
in vi. |
|
.Pp |
.Pp |
Mode key bindings are defined in a set of named tables: |
Mode key bindings are defined in a set of named tables: |
.Em vi-edit |
.Em vi-edit |
and |
and |
.Em emacs-edit |
.Em emacs-edit |
for keys used when line editing at the command prompt; |
for keys used when line editing at the command prompt; and |
.Em vi-choice |
.Em vi-choice |
and |
and |
.Em emacs-choice |
.Em emacs-choice |
for keys used when choosing from lists (such as produced by the |
for keys used when choosing from lists (such as produced by the |
.Ic choose-window |
.Ic choose-window |
command); and |
command). |
.Em vi-copy |
|
and |
|
.Em emacs-copy |
|
used in copy mode. |
|
The tables may be viewed with the |
|
.Ic list-keys |
|
command and keys modified or removed with |
|
.Ic bind-key |
|
and |
|
.Ic unbind-key . |
|
If |
|
.Ic append-selection , |
|
.Ic copy-selection , |
|
or |
|
.Ic start-named-buffer |
|
are given the |
|
.Fl x |
|
flag, |
|
.Nm |
|
will not exit copy mode after copying. |
|
.Ic copy-pipe |
|
copies the selection and pipes it to a command. |
|
For example the following will bind |
|
.Ql C-w |
|
not to exit after copying and |
|
.Ql C-q |
|
to copy the selection into |
|
.Pa /tmp |
|
as well as the paste buffer: |
|
.Bd -literal -offset indent |
|
bind-key -temacs-copy C-w copy-selection -x |
|
bind-key -temacs-copy C-q copy-pipe "cat >/tmp/out" |
|
.Ed |
|
.Pp |
.Pp |
The paste buffer key pastes the first line from the top paste buffer on the |
|
stack. |
|
.Pp |
|
The synopsis for the |
The synopsis for the |
.Ic copy-mode |
.Ic copy-mode |
command is: |
command is: |
|
|
.Bl -tag -width Ds |
.Bl -tag -width Ds |
.It Xo Ic bind-key |
.It Xo Ic bind-key |
.Op Fl cnr |
.Op Fl cnr |
.Op Fl R Ar repeat-count |
|
.Op Fl t Ar mode-table |
.Op Fl t Ar mode-table |
.Op Fl T Ar key-table |
.Op Fl T Ar key-table |
.Ar key Ar command Op Ar arguments |
.Ar key Ar command Op Ar arguments |
|
|
the binding for command mode with |
the binding for command mode with |
.Fl c |
.Fl c |
or for normal mode without. |
or for normal mode without. |
For keys in the |
|
.Em vi-copy |
|
or |
|
.Em emacs-copy |
|
tables, |
|
.Fl R |
|
specifies how many times the command should be repeated. |
|
.Pp |
.Pp |
See the |
|
.Sx WINDOWS AND PANES |
|
section and the |
|
.Ic list-keys |
|
command for information on mode key bindings. |
|
.Pp |
|
To view the default bindings and possible commands, see the |
To view the default bindings and possible commands, see the |
.Ic list-keys |
.Ic list-keys |
command. |
command. |
|
|
or |
or |
.Em emacs-copy . |
.Em emacs-copy . |
.It Xo Ic send-keys |
.It Xo Ic send-keys |
.Op Fl lMR |
.Op Fl lMRX |
|
.Op Fl N Ar repeat-count |
.Op Fl t Ar target-pane |
.Op Fl t Ar target-pane |
.Ar key Ar ... |
.Ar key Ar ... |
.Xc |
.Xc |
|
|
.Fl M |
.Fl M |
passes through a mouse event (only valid if bound to a mouse key binding, see |
passes through a mouse event (only valid if bound to a mouse key binding, see |
.Sx MOUSE SUPPORT ) . |
.Sx MOUSE SUPPORT ) . |
|
.Pp |
|
.Fl X |
|
is used to send a command into copy mode - see |
|
the |
|
.Sx WINDOWS AND PANES |
|
section. |
|
.Fl N |
|
specifies a repeat count to a copy mode command. |
.It Xo Ic send-prefix |
.It Xo Ic send-prefix |
.Op Fl 2 |
.Op Fl 2 |
.Op Fl t Ar target-pane |
.Op Fl t Ar target-pane |
|
|
Commands related to the status line are as follows: |
Commands related to the status line are as follows: |
.Bl -tag -width Ds |
.Bl -tag -width Ds |
.It Xo Ic command-prompt |
.It Xo Ic command-prompt |
|
.Op Fl 1 |
.Op Fl I Ar inputs |
.Op Fl I Ar inputs |
.Op Fl p Ar prompts |
.Op Fl p Ar prompts |
.Op Fl t Ar target-client |
.Op Fl t Ar target-client |
|
|
to |
to |
.Ql %9 |
.Ql %9 |
.Pc . |
.Pc . |
|
.Pp |
|
.Fl 1 |
|
makes the prompt only accept one key press, in this case the resulting input |
|
is a single character. |
.It Xo Ic confirm-before |
.It Xo Ic confirm-before |
.Op Fl p Ar prompt |
.Op Fl p Ar prompt |
.Op Fl t Ar target-client |
.Op Fl t Ar target-client |