Choose tmux because screen cmd has no function like C-b + z.
First, ensure tmux server is down by cmd
1 | tmux ls |
~/.tmux.conf
1 2 3 4 5 | set -g status off set -g mouse on set-window-option -g mode-keys vi bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard" |
install xclip
1 | apt install xclip |
Common commands,
1 2 3 4 5 6 | c open new window
w window list
" split window up and down
% split window left and right
[ copy mode, 'q' to exit
d hang up tmux, 'tmux attach' to return |
refer to:
https://unix.stackexchange.com/questions/131011/use-system-clipboard-in-vi-copy-mode-in-tmux
https://jdhao.github.io/2018/09/30/tmux_settings_for_vim_users/