tmux: vi 복사 모드에서 줄 단위 텍스트 선택

tmux: vi 복사 모드에서 줄 단위 텍스트 선택

에서는 tmux일반적으로 복사할 줄 전체를 선택하고 싶습니다.

vi님의 명령 처럼 텍스트 줄을 어떻게 선택하나요 V?

답변1

복사 모드에서 해결책은 다음과 같습니다.

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.

답변2

명령 tmux은 입니다 select-line.

다음은 내가 사용하는 멋진 매핑 세트입니다(를 copy-mode사용하지 않는 경우 사용 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 ]

관련 정보