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 C-\ split-window -v
71 bind i select-pane -t :.+
72 bind C-i select-pane -t :.+
73 bind I select-pane -t :.-
75 bind . select-layout even-vertical
76 bind , select-layout tiled
77 # Simulate maximising the window.
78 bind / select-layout even-vertical \; swap-pane -s top \; resize-pane -D 9999
81 # Set current window title.
82 bind t command-prompt -p "Set window's title to:" 'rename-window %1'
85 # Monitor window for a particular string.
86 bind m command-prompt -p "Monitor:" 'setw monitor-content %1'
87 bind M setw monitor-content ""
89 bind \; setw synchronize-panes
90 # Choose buffer to paste.
91 bind } choose-buffer 'paste-buffer -b %%'
92 # Enter copy-mode and scroll up.
94 # Choose buffer to show.
95 # XXX: As of tmux 1.3 this doesn't work.
96 #bind '"' choose-buffer 'show-buffer -b %%'
97 bind '"' list-buffers \; command-prompt -p "Choose buffer to show:" 'show-buffer -b %1'
100 ################################################################################
101 # Fix missing binds in Vi modes.
102 ################################################################################
104 bind -t vi-edit C-u delete-line
105 # We can't delete a word so ^w can clear the whole line for now.
106 bind -t vi-edit C-w delete-line
107 bind -t vi-edit Up history-up
108 bind -t vi-edit Down history-down
109 bind -t vi-edit Left cursor-left
110 bind -t vi-edit Right cursor-right
112 bind -t vi-copy y copy-selection
114 ################################################################################
116 ################################################################################
117 set -g default-terminal 'screen-256color'
118 # PuTTY needs help to set bold colours.
119 set -g terminal-overrides 'putty-256color:C8'
121 ################################################################################
122 # Window and pane settings.
123 ################################################################################
124 set -g display-panes-time 1000
125 set -g display-panes-active-colour white
126 set -g display-panes-colour colour17
128 set -g message-bg colour90
129 set -g message-fg white
131 set -g pane-active-border-bg default
132 set -g pane-active-border-fg white
134 set -g pane-border-bg default
135 set -g pane-border-fg colour17
138 setw -g mode-fg white
139 # Monitored windows (in reverse video).
140 setw -g window-status-alert-bg red
141 setw -g window-status-alert-fg white
143 ################################################################################
145 ################################################################################
146 # Don't update the title bar.
147 set -g set-titles off
148 # Status line black on white.
149 set -g status-attr none
150 set -g status-bg white
151 set -g status-fg black
152 # Current window white on blue.
153 setw -g window-status-current-attr none
154 setw -g window-status-current-bg colour17
155 setw -g window-status-current-fg white
157 set -g status-left ''
158 set -g status-right '#[fg=white,bg=colour8][#H:#S]'
160 setw -g window-status-current-format '[#I.#P#F #W]'
161 setw -g window-status-format ' #I.#P#F #W '
162 # Don't set window name. XXX: Issue with PROMPT_COMMAND.
163 #setw -g automatic-rename off