Overview
本文为 “工欲善其事,必先利其器!” 系列之 tmux。
地球人都知道,tmux 是终端神器,面对网上巨量的使用指南有点懵。
在 github 上面找到 tmux 项目的主页,发现其还在不停的开发迭代。
tmux is part of the OpenBSD base system, tmux currently sees a new release approximately every six months - the same schedule as OpenBSD, around May and October.
快速获得帮助
man 1 tmux
jianguos@jianguos-gv:~$ tmux -Version
tmux 2.6
jianguos@jianguos-gv:~$ man 1 tmux
ctrl + b 然后输入?
bind-key -T copy-mode C-Space send-keys -X begin-selection
bind-key -T copy-mode C-a send-keys -X start-of-line
bind-key -T copy-mode C-b send-keys -X cursor-left
bind-key -T copy-mode C-c send-keys -X cancel
bind-key -T copy-mode C-e send-keys -X end-of-line
bind-key -T copy-mode C-f send-keys -X cursor-right
bind-key -T copy-mode C-g send-keys -X clear-selection
bind-key -T copy-mode C-k send-keys -X copy-end-of-line
bind-key -T copy-mode C-n send-keys -X cursor-down
tmux wiki
tmux configuration file: ~/.tmux.conf
目前,俺的就加了一条 set -g mouse on
, 即默认 support 鼠标:
jianguos@jianguos-gv:~$ cat ~/.tmux.conf
set -g mouse on
mouse [on | off] If on, tmux captures the mouse and allows mouse events to be bound as key bindings. See the MOUSE SUPPORT section for details.
tmux 和 Tabby 完美搭配
Tabby, A terminal for a more modern age
Reference
阮一峰 阮老师的中文教程也相当不错: