Answers:
简短的答案:空格开始选择并输入副本。
为了将来参考,我从tmux手册页获得了此信息:
Function vi emacs
Back to indentation ^ M-m
Clear selection Escape C-g
Copy selection Enter M-w
Cursor down j Down
Cursor left h Left
Cursor right l Right
Cursor to bottom line L
Cursor to middle line M M-r
Cursor to top line H M-R
Cursor up k Up
Delete entire line d C-u
Delete to end of line D C-k
End of line $ C-e
Goto line : g
Half page down C-d M-Down
Half page up C-u M-Up
Next page C-f Page down
Next word w M-f
Paste buffer p C-y
Previous page C-b Page up
Previous word b M-b
Quit mode q Escape
Scroll down C-Down or J C-Down
Scroll up C-Up or K C-Up
Search again n n
Search backward ? C-r
Search forward / C-s
Start of line 0 C-a
Start selection Space C-Space
Transpose chars C-t
更新:该tmux list-keys
命令还将列出您拥有的所有自定义键绑定。
您使用空格键作为选择的开始,然后输入作为结束。
复制:
糊:
Ctrl+b+]
。回想起来很明显,但是我来回几次,直到我坚持不懈。
您还可以通过添加以下内容来设置.tmux.conf文件:
# Use v to trigger selection
bind-key -T copy-mode-vi v send-keys -X begin-selection
# Use y to yank current selection
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
像vim一样,这将使“ v”和“ y”进入可视模式并进行复制。
(来源)
bind-key -T copy-mode-vi ...
上游(2.4+)tmux更改了绑定以开始选择的方式。使用以下命令为OP要求使用-T
和发送键创建绑定-X
:
# Use v to trigger selection
bind-key -T copy-mode-vi v send-keys -X begin-selection
# Use y to yank current selection
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
tmux
升级破坏我的配置的频率比我想要的还要高... :-(