Techs of copying without mouse
Tmux to system clipboard
- sudo apt-get install xclip # A tool to manage the system clip board which is called by tmux.
- Add following in
~/.tmux.conf
bind P paste-buffer
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection
bind-key -T copy-mode-vi r send-keys -X rectangle-toggle
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
- Restart tmux(Ensure you have closed all tmux session), you can run
<C-b>: list-keys
to check wheter key-binding works.
- Usage
1.Press <C-b> [
to enter copy mode
2. Press space
to start selection
3. Press h l j k
to select, you can press r
to