Tmux

Tmux 複製和滾動 iterm

  • June 28, 2020

如何通過滾動從大文件中複製。我無法開始選擇。我能夠通過以下方式啟動複製模式

ctrl + B [

但我無法開始選擇。我space 仍然沒有運氣。在從中選擇後,我有以下 tmux list-keys 的輸出

bind-key    -T copy-mode    C-Space              send-keys -X begin-selection
bind-key    -T copy-mode    C-g                  send-keys -X clear-selection
bind-key    -T copy-mode    C-w                  send-keys -X copy-selection-and-cancel
bind-key    -T copy-mode    MouseDrag1Pane       select-pane \; send-keys -X begin-selection
bind-key    -T copy-mode    MouseDragEnd1Pane    send-keys -X copy-selection-and-cancel
bind-key    -T copy-mode    M-w                  send-keys -X copy-selection-and-cancel
bind-key    -T copy-mode-vi C-j                  send-keys -X copy-selection-and-cancel
bind-key    -T copy-mode-vi Enter                send-keys -X copy-selection-and-cancel
bind-key    -T copy-mode-vi Escape               send-keys -X clear-selection
bind-key    -T copy-mode-vi Space                send-keys -X begin-selection
bind-key    -T copy-mode-vi A                    send-keys -X append-selection-and-cancel
bind-key    -T copy-mode-vi MouseDrag1Pane       select-pane \; send-keys -X begin-selection
bind-key    -T copy-mode-vi MouseDragEnd1Pane    send-keys -X copy-selection-and-cancel

注意:我在 ~/.tmux_conf 沒有 tmux conf

您可能處於“複製模式”而不是“複製模式-vi”。嘗試ctrl+space如第一行命令所示tmux list-keys

bind-key    -T copy-mode    C-Space              send-keys -X begin-selection

如果可行,您需要使用ctrl+w將其複製到緩衝區中,如下所示:

bind-key    -T copy-mode    C-w                  send-keys -X copy-selection-and-cancel

如果這不起作用,請告訴我。

引用自:https://unix.stackexchange.com/questions/595344