我在tmux模式下使用byobu。在屏幕上我可以这样做:
Ctrl+a [, move to line, Y, Ctrl+a ]"Y“将整条线复制到剪贴板中。我期待在tmux模式下的byobu类似的东西。我唯一发现的是:
Ctrl+a/b (depends on your setting) + [, move to line, 0, space, $, enter, Ctrl+a/b + ]但我觉得这是很难达到击键,Y是容易得多。
发布于 2018-11-01 08:54:48
我有~/..byobu/.tmux.conf
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection因此,通常我可以通过以下方式进入复制模式:
前缀+[
然后,我可以使用vi命令导航并按'v‘输入vi选择模式,然后按'y’选择所选内容。
在此之后,我可以通过以下方式将/粘贴到终端:
前缀+]
为了复制一行:
Prefix + [
navigate to the line
$ (jump to the end)
Left Arrow
v (begin-selection)
0 (jump to the start of the line)
y (yank and exit copy mode)
Prefix + ] (paste the line)发布于 2019-02-15 19:36:21
我找到了原来问题的答案。
您需要配置中的以下行:
bind-key -T copy-mode-vi Y send-keys -X end-of-line \; send-keys -X cursor-left \; send-keys -X begin-selection \; send-keys -X start-of-line \; send-keys -X copy-selection-and-cancel发布于 2019-01-18 07:53:02
由于较新的Tmux版本,我不得不更改配置:
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection \; send-keys -X cancel感谢'rushiagr‘(http://www.rushiagr.com/blog/2016/06/16/everything-you-need-to-know-about-tmux-copy-pasting-ubuntu)
https://unix.stackexchange.com/questions/381704
复制相似问题