tmux
Install
sudo apt install tmux xsel
cd
git clone https://github.com/gpakosz/.tmux.git
ln -s -f .tmux/.tmux.conf
cp .tmux/.tmux.conf.local .
# 编辑 ~/.tmux.conf.local 以定制自己的新需求
# start with mouse mode enabled
set -g mouse on
tmux_conf_copy_to_os_clipboard=true
plugins
# 编辑 .tmux.conf.local
set -g @plugin 'tmux-plugins/tmux-cpu'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @continuum-restore 'on'
# 常用配置
set -g @plugin 'tmux-plugins/tmux-sensible'
# 复制/粘贴
set -g @plugin 'tmux-plugins/tmux-yank'
# 安装配置里的插件
prefix + I # 大写的I代表Install
prefix + u # 更新插件
restore session
prefix + Ctrl-s # 保存
# 重启后恢复会话
prefix + Ctrl-r # 恢复
tmux-yank
- Normal Mode
prefix–y
— copies text from the command line to the clipboard.prefix–Y
— copy the current pane’s current working directory to the clipboard.
- Copy Mode
y
— copy selection to system clipboard.Y
(shift-y) — “put” selection. Equivalent to copying a selection, and pasting it to the command line.
reload
tmux source .tmux.conf