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 ################################################################################
20 # Screen compatibility.
21 ################################################################################
26 bind C-l refresh-client
28 bind S split-window -v
29 bind | split-window -h
33 bind _ setw monitor-activity
35 bind < command-prompt -p "Load buffer from file:" 'load-buffer %1'
36 bind > command-prompt -p "Save buffer to file:" 'save-buffer %1'
38 ################################################################################
40 ################################################################################
41 # Up and down like Vim.
43 bind C-j select-pane -D
45 bind C-k select-pane -U
46 # Previous and next panes kinda like Vim.
48 bind C-h select-pane -L
50 bind C-l select-pane -R
52 bind H previous-window
54 # Last window like Vim.
64 # Move the current pane into a separate window.
66 # Split another pane into this window.
67 bind B command-prompt -p "Select [<window>.]<pane> to join:" 'join-pane -s %1'
69 bind i select-pane -t :.+
70 bind C-i select-pane -t :.+
71 bind I select-pane -t :.-
73 bind . select-layout even-vertical
74 bind , select-layout tiled
75 # Simulate maximising the window.
76 bind / select-layout even-vertical \; swap-pane -s top \; resize-pane -D 9999
79 # Set current window title.
80 bind t command-prompt -p "Set window's title to:" 'rename-window %1'
83 # Monitor window for a particular string.
84 bind m command-prompt -p "Monitor:" 'setw monitor-content %1'
85 bind M setw monitor-content ""
87 bind \; setw synchronize-panes
88 # Choose buffer to paste.
89 bind } choose-buffer 'paste-buffer -b %%'
90 # Enter copy-mode and scroll up.
92 # Choose buffer to show.
93 # XXX: As of tmux 1.3 this doesn't work.
94 #bind '"' choose-buffer 'show-buffer -b %%'
95 bind '"' list-buffers \; command-prompt -p "Choose buffer to show:" 'show-buffer -b %1'
98 ################################################################################
99 # Fix missing binds in Vi modes.
100 ################################################################################
102 bind -t vi-edit C-u delete-line
103 # We can't delete a word so ^w can clear the whole line for now.
104 bind -t vi-edit C-w delete-line
105 bind -t vi-edit Up history-up
106 bind -t vi-edit Down history-down
107 bind -t vi-edit Left cursor-left
108 bind -t vi-edit Right cursor-right
110 bind -t vi-copy y copy-selection
112 ################################################################################
114 ################################################################################
115 set -g default-terminal 'screen-256color'
116 # PuTTY needs help to set bold colours.
117 set -g terminal-overrides 'putty-256color:C8'
119 ################################################################################
120 # Window and pane settings.
121 ################################################################################
122 set -g display-panes-time 1000
123 set -g display-panes-active-colour white
124 set -g display-panes-colour colour17
126 set -g message-bg colour90
127 set -g message-fg white
129 set -g pane-active-border-bg default
130 set -g pane-active-border-fg white
132 set -g pane-border-bg default
133 set -g pane-border-fg colour17
136 setw -g mode-fg white
137 # Monitored windows (in reverse video).
138 setw -g window-status-alert-bg red
139 setw -g window-status-alert-fg white
141 ################################################################################
143 ################################################################################
144 # Don't update the title bar.
145 set -g set-titles off
146 # Status line black on white.
147 set -g status-attr none
148 set -g status-bg white
149 set -g status-fg black
150 # Current window white on blue.
151 setw -g window-status-current-attr none
152 setw -g window-status-current-bg colour17
153 setw -g window-status-current-fg white
155 set -g status-left ''
156 set -g status-right '#[fg=white,bg=colour8][#H:#S]'
158 setw -g window-status-current-format '[#I.#P#F #W]'
159 setw -g window-status-format ' #I.#P#F #W '
160 # Don't set window name. XXX: Issue with PROMPT_COMMAND.
161 #setw -g automatic-rename off