forked from laixintao/myrc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
84 lines (68 loc) · 2.35 KB
/
.tmux.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Install tmux plug-in manager first(https://github.com/tmux-plugins/tpm)
# git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# Install on OS X:
# You need .tmux.conf and .tmux-osx.conf
# install on a server that only support tmux1.8
# wget https://raw.githubusercontent.com/laixintao/myrc/master/.tmux.conf -O ~/.tmux.conf
# Key Binding --------------------{{{
# 前缀
unbind C-b
set -g prefix C-a
bind C-a send-prefix
bind r source-file ~/.tmux.conf \; display-message "Config Reloaded!"
unbind %
bind | split-window -h -c "#{pane_current_path}" # 使用|竖屏,方便分屏 使用当前路径
unbind '"'
bind - split-window -v -c "#{pane_current_path}" # 使用-横屏,方便分屏
# use vim mode to move panel
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind K clear-history
bind l select-pane -R
bind-key * list-clients
## Join windows: <prefix> s, <prefix> j
bind-key g command-prompt -p "send pane to:" "join-pane -t '%%'"
bind b break-pane
# Move window to left
bind \{ swap-window -t -1\; select-window -t -1
bind \} swap-window -t +1\; select-window -t +1
# Killer
bind x kill-pane
bind X kill-window
set -g set-titles on
set -g set-titles-string "[#S] #I:#W"
# }}}
# General settings --------------------{{{
setw -g mode-keys vi
set -g default-terminal "screen-256color" # use 256 colors
set -as terminal-overrides ',xterm*:Tc:sitm=\E[3m'
set -g display-time 400 # status line messages display
set -g history-limit 100000 # scrollback buffer n lines
set -g base-index 1
setw -g pane-base-index 1
# }}}
# Status bar --------------------{{{
set -g status-bg black
set -g status-fg white
set-option -g status-justify centre
set-option -g status-left '#[fg=cyan][#{session_name}]'
set-option -g status-left-length 25
# window
setw -g automatic-rename off
set-option -g allow-rename off
set-window-option -g window-style default
set-window-option -g clock-mode-colour black
set-window-option -g clock-mode-style 24
set-window-option -g monitor-activity on
set-window-option -g visual-bell off
# disable sound bell
set -g bell-action none
bind-key c new-window -n 'shell'
# }}}
# panel --------------------{{{
set-option -g display-panes-active-colour blue
set-option -g display-panes-colour brightred
# }}}
# for os x
if-shell 'test "$(uname)" = "Darwin"' 'source ~/.tmux-osx.conf'