-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
66 lines (52 loc) · 1.87 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
# Set prefix key to Ctrl-a
unbind-key C-b
set-option -g prefix C-a
## time
set-option -g display-time 3000 # message display time in (ms), should long enough
#set-option -g repeat-time 1000 # lasting time (ms) between a repeatable command
set-option -sg escape-time 1 # waiting time (ms) after prefix, small for more responsitive
set-option -g default-terminal "screen-256color"
## style
set-option -g status-keys vi
set-window-option -g mode-keys vi
#set-window-option -g utf8 on
# control sessions
bind-key z confirm-before -p "kill-session #S? (y/n)" kill-session
# 不使用prefix键,使用Ctrl和左右方向键方便切换窗口
# mac下ctrl和方向键组合被占用,因此改用vim的方向键
bind-key -n "C-Left" select-window -t :-
bind-key -n "C-Right" select-window -t :+
#bind-key -n "C-h" select-window -t :- \; display-message
#bind-key -n "C-l" select-window -t :+ \; display-message
#bind-key -n "C-h" select-window -t :-
#bind-key -n "C-l" select-window -t :+
bind-key -n "C-'" command-prompt -p index "select-window -t ':%%'"
## split window
unbind '"'
bind - splitw -v -c "#{pane_current_path}"
unbind %
bind \ splitw -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
## status bar
#set-option -g status-utf8 on
set -g status-left-length 20
set -g status-justify centre
set -g status-bg colour235
set -g status-fg colour248
setw -g window-status-current-fg colour223
setw -g window-status-current-bg colour237
setw -g window-status-current-attr bold
setw -g window-status-current-format "[#I:#W#F]"
# zoom pane <-> window
# #http://tmux.svn.sourceforge.net/viewvc/tmux/trunk/examples/tmux-zoom.sh
#up
bind-key k select-pane -U
##down
bind-key j select-pane -D
##left
bind-key h select-pane -L
##right
bind-key l select-pane -R
# reload config (prefix r)
bind r source ~/.tmux.conf \; display "Configuration reloaded!"
set-option -g history-limit 10000