1 ################################################################################
3 ################################################################################
4 # Use vi keys for scrolling etc.
5 # Use lsk -t vi|emacs-<table> to see binds in table choice, copy or edit.
9 # Don't wait so long to parse escape sequences.
10 set -s escape-time 100
13 setw -g clock-mode-colour white
14 setw -g clock-mode-style 24
17 set -g history-limit 4096
19 # Don't use the mouse to select text by default.
20 # It has two important flaws. Double-clicking to select a word doesn't work.
21 # Middle clicking to paste doesn't work.
22 set -g mouse-resize-pane off
23 set -g mouse-select-pane off
24 set -g mouse-select-window off
27 ################################################################################
28 # Screen compatibility.
29 ################################################################################
34 bind S split-window -v
35 bind | split-window -h
39 bind _ setw monitor-activity
40 bind M-_ setw monitor-silence 10
42 bind < command-prompt -p "Load buffer from file:" 'load-buffer %1'
43 bind > command-prompt -p "Save buffer to file:" 'save-buffer %1'
45 ################################################################################
47 ################################################################################
48 # Up and down like Vim.
50 bind -r C-j select-pane -D
52 bind -r C-k select-pane -U
53 # Don't let arrow keys repeat.
54 bind Up select-pane -U
55 bind Down select-pane -D
56 bind Left select-pane -L
57 bind Right select-pane -R
58 # Previous and next panes kinda like Vim.
60 bind -r C-h select-pane -L
62 bind -r C-l select-pane -R
64 bind -r H previous-window
66 # Last window like Vim.
75 bind -r O swap-pane -U
76 bind w command-prompt -p "Select [<window>.]<pane> to swap:" 'swap-pane -s . -t %1'
78 bind W choose-window "swap-window -t '%%'"
81 # Move the current pane into a separate window.
83 # Split another pane into this window.
84 bind B command-prompt -p "Select <window>[.<pane>] to join:" 'join-pane -s %1'
86 bind C-\ split-window -v
88 bind i select-pane -t :.+
89 bind -r C-i select-pane -t :.+
90 bind -r I select-pane -t :.-
92 bind -r C-M-h resize-pane -L
93 bind -r C-M-j resize-pane -D
94 bind -r C-M-k resize-pane -U
95 bind -r C-M-l resize-pane -R
97 bind , select-layout even-vertical
98 bind . select-layout even-horizontal
99 bind / select-layout tiled
100 bind M-, select-layout main-vertical
101 bind M-. select-layout main-horizontal
102 bind Space next-layout
103 bind -r C-Space next-layout
104 # Simulate maximising the window.
105 bind / select-layout main-horizontal \; resize-pane -D 9999
106 bind M-/ select-layout tiled
109 bind M-0 select-window -t 10
110 bind M-1 select-window -t 11
111 bind M-2 select-window -t 12
112 bind M-3 select-window -t 13
113 bind M-4 select-window -t 14
114 bind M-5 select-window -t 15
115 bind M-6 select-window -t 16
116 bind M-7 select-window -t 17
117 bind M-8 select-window -t 18
118 bind M-9 select-window -t 19
119 # Set current window title.
120 bind t command-prompt -p "Set window's title to:" 'rename-window %1'
123 # Monitor window for a particular string.
124 bind m command-prompt -p "Monitor:" 'setw monitor-content %1'
125 bind M setw monitor-content ""
127 bind \; setw synchronize-panes
128 # Choose buffer to paste.
129 bind } choose-buffer 'paste-buffer -b %%'
130 # Enter copy-mode and scroll up.
132 # Choose buffer to show.
133 # XXX: As of tmux 1.3 this doesn't work.
134 #bind '"' choose-buffer 'show-buffer -b %%'
135 bind '"' list-buffers \; command-prompt -p "Choose buffer to show:" 'show-buffer -b %1'
136 bind "'" new-window -n "[buffer]" "cat > /dev/null" \; paste-buffer
137 # Toggle mouse mode as it is useful despite the flaws listed above.
138 bind C-m set -g mouse-resize-pane \; set -g mouse-select-pane \; set -g mouse-select-window \; set -g mode-mouse
140 ################################################################################
141 # Fix missing binds in Vi modes.
142 ################################################################################
144 bind -t vi-edit C-u delete-line
145 # We can't delete a word so ^w can clear the whole line for now.
146 bind -t vi-edit C-w delete-line
147 bind -t vi-edit Up history-up
148 bind -t vi-edit Down history-down
149 bind -t vi-edit Left cursor-left
150 bind -t vi-edit Right cursor-right
152 bind -t vi-copy y copy-selection
154 ################################################################################
156 ################################################################################
157 set -g default-terminal 'screen-256color'
158 # PuTTY needs help to set bold colours.
159 set -a -g terminal-overrides ',putty-256color:C8:Ms=\\E]52;%p1%s;%p2%s\\007m'
161 ################################################################################
162 # Window and pane settings.
163 ################################################################################
164 set -g display-panes-time 1000
165 set -g display-panes-active-colour white
166 set -g display-panes-colour colour17
168 set -g message-bg colour90
169 set -g message-fg white
170 set -g message-command-bg colour88
171 set -g message-command-fg white
173 set -g pane-active-border-bg default
174 set -g pane-active-border-fg colour31
176 set -g pane-border-bg default
177 set -g pane-border-fg colour17
180 setw -g mode-fg white
181 # Monitored windows (in reverse video).
182 setw -g window-status-alert-bg red
183 setw -g window-status-alert-fg white
184 # As of tmux 1.6 we can highlight different alerts.
185 setw -g window-status-bell-bg colour22
186 setw -g window-status-bell-fg white
187 setw -g window-status-content-bg colour88
188 setw -g window-status-content-fg white
189 setw -g window-status-content-attr none
190 setw -g window-status-activity-bg red
191 setw -g window-status-activity-fg white
193 ################################################################################
195 ################################################################################
196 # Don't update the title bar.
197 set -g set-titles off
198 # Status line black on white.
199 set -g status-attr none
200 set -g status-bg white
201 set -g status-fg black
202 # Current window white on blue.
203 setw -g window-status-current-attr none
204 setw -g window-status-current-bg colour17
205 setw -g window-status-current-fg white
207 set -g status-left ''
208 set -g status-right '#[fg=white,bg=colour8][#H:#S]'
210 setw -g window-status-current-format '[#I.#P#F #W]'
211 setw -g window-status-format ' #I.#P#F #W '
212 # Don't set window name. XXX: Issue with PROMPT_COMMAND.
213 #setw -g automatic-rename off