Skip to content

Instantly share code, notes, and snippets.

@HouCoder
Last active April 21, 2016 06:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HouCoder/fd887a52c581e6c0d0b1 to your computer and use it in GitHub Desktop.
Save HouCoder/fd887a52c581e6c0d0b1 to your computer and use it in GitHub Desktop.
My Tmux config, save it to ~/.tmux.conf.
# 前置按键(bind-key)为Ctrl+b
# 一些基础的命令:
# list all sessions: tmux ls
# create a session: tmux new -s [new-session-name]
# attach to a session: tmux a -t [session-name]
# switch Sessions: tmux switch -t [session-name]
# 一些基础的快捷键
# bind-key ( 上一个Session
# bind-key ) 下一个Session
# bind-key L 最后一个Session
# bind-key s 从session列表中选择session
# bind-key ? 显示所有命令及说明
# bind-key % 将session分割为左右两个面板
# bind-key " 将session分割为上下两个面板
# bind-key d 跳出当前session
# 切换面板
bind-key k select-pane -U
bind-key j select-pane -D
bind-key h select-pane -L
bind-key l select-pane -R
# 将copy-mode的快捷键设置为VI模式
setw -g mode-keys vi
# 设置终端滚动最大历史记录
set -g history-limit 10000
# 调整面板大小
# 向左
bind Left resize-pane -L 5
# 向右
bind Right resize-pane -R 5
# 向下
bind Down resize-pane -D 5
# 向上
bind Up resize-pane -U 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment