Tmux 安装 & 配置

2021-08-07  本文已影响0人  RoyTien

安装

依赖

Platform Command Run
Debian apt-get install libevent; ncurses
RHEL or CentOS yum install libevent; ncurses

Tmux

Platform Install Command Version
Debian or Ubuntu apt install tmux 2.8
RHEL or CentOS yum install tmux 1.8
macOS brew install tmux

配置 Oh my tmux

Requirements:

Install

To install, run the following from your terminal: (you may want to backup your existing ~/.tmux.conf first)

$ cd
$ git clone https://github.com/gpakosz/.tmux.git
$ ln -s -f .tmux/.tmux.conf
$ cp .tmux/.tmux.conf.local .

如果需要编辑你自己的配置,你可以修改 .tmux.conf.local 配置。

鼠标模式

这个配置默认没开鼠标模式,可以手动打开:

vim ~/.tmux.conf.local
# /mouse 回车
# 找到下面这一行:
# set -g mouse on
# 把前面的 # 去掉就好了

# 2.1版之前要开鼠标模式要输入4个命令
set -g mode-mouse on
set -g mouse-resize-pane on
set -g mouse-select-pane on
set -g mouse-select-window on

# 2.1之后就只要一句就可以了
set -g mouse on

# github 上的版本 >= 2.2

# 然后在 tmux 里 
Ctrl+b
Shift+;
source-file ~/.tmux.conf
# 重新加载配置文件

vi模式

# force Vi mode
# really you should export VISUAL or EDITOR environment variable, see manual
set -g status-keys vi
set -g mode-keys vi

使用

上一篇 下一篇

猜你喜欢

热点阅读