Last active
April 6, 2017 13:54
-
-
Save lneoe/ca37ef65826bf77fe632cb990f74f6f3 to your computer and use it in GitHub Desktop.
tmux.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -g default-terminal "tmux-256color" | |
# 重新读取加载配置文件 | |
bind R source-file ~/.tmux.conf \; display-message "Config reloaded..." | |
set -g history-limit 10000 | |
setw -g monitor-activity on | |
set -g visual-activity on | |
# use vi keys | |
set -g mode-keys vi | |
# y and p as in vim | |
# bind Escape copy-mode | |
unbind p | |
bind p paste-buffer | |
bind -t vi-copy 'v' begin-selection | |
bind -t vi-copy 'y' copy-selection | |
bind -t vi-copy 'Space' halfpage-down | |
bind -t vi-copy 'Bspace' halfpage-up | |
# extra commands for interacting with the ICCCM clipboard | |
bind C-c run "tmux save-buffer - | xclip -i -sel clipboard" | |
bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer" | |
# 用 vim 的方式在窗格间移动光标 | |
unbind-key j | |
bind-key j select-pane -D | |
unbind-key k | |
bind-key k select-pane -U | |
unbind-key h | |
bind-key h select-pane -L | |
unbind-key l | |
bind-key l select-pane -R | |
unbind % | |
bind | split-window -h # 使用|竖屏,方便分屏 | |
unbind '"' | |
bind - split-window -v # 使用-横屏,方便分屏 | |
# 按照 编号却换 panel | |
unbind 0 | |
bind-key 0 select-pane -t 0 | |
unbind 1 | |
bind-key 1 select-pane -t 1 | |
unbind 2 | |
bind-key 2 select-pane -t 2 | |
unbind 3 | |
bind-key 3 select-pane -t 3 | |
unbind 4 | |
bind-key 4 select-pane -t 4 | |
unbind 5 | |
bind-key 5 select-pane -t 5 | |
unbind 6 | |
bind-key 6 select-pane -t 6 | |
unbind 7 | |
bind-key 7 select-pane -t 7 | |
unbind 8 | |
bind-key 8 select-pane -t 8 | |
unbind 9 | |
bind-key 9 select-pane -t 9 | |
# 使用布局 | |
bind-key T source-file ~/.tmux/layout |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment