tmux: seleção de texto em linha no modo de cópia vi

tmux: seleção de texto em linha no modo de cópia vi

Em tmux, geralmente desejo selecionar linhas inteiras para copiar.

Como posso selecionar a linha de texto, como o comando vide V?

Responder1

Aqui está a solução, em modo cópia

1. move to the line you want to select
2. pres 0, then the cursor will move to the fist position of this line, 
same as vim
3. enter whitespace (start copy)
4. type $. Then it will highlight the whole line.

Responder2

O tmuxcomando é select-line.

Aqui está um bom conjunto de mapeamentos que eu uso (use copy-modese não estiver usando copy-mode-vi):

# Selection / copy / paste
bind-key -T copy-mode-vi v   send -X begin-selection  # default is <space>
bind-key -T copy-mode-vi V   send -X select-line
bind-key -T copy-mode-vi C-v send -X rectangle-toggle  # default is C-v, or R in copy-mode (non-vi)
bind-key -T copy-mode-vi y   send -X copy-pipe-and-cancel 'xclip -selection clipboard -in'
bind p paste-buffer  # default ]

informação relacionada