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
16 ################################################################################
17 # Screen compatibility.
18 ################################################################################
22 bind C-l refresh-client
24 bind S split-window -v
25 bind | split-window -h
29 bind _ setw monitor-activity
31 bind < command-prompt -p "Load buffer from file:" 'load-buffer %1'
32 bind > command-prompt -p "Save buffer to file:" 'save-buffer %1'
34 ################################################################################
36 ################################################################################
37 # Up and down like Vim.
39 bind C-j select-pane -D
41 bind C-k select-pane -U
42 # Previous and next window kinda like Vim.
43 bind h previous-window
44 bind C-h previous-window
51 bind J select-pane -t bottom
52 bind K select-pane -t top
57 # Move the current pane into a separate window.
59 # Split another pane into this window.
60 bind B command-prompt -p "Select [<window>.]<pane> to join:" 'join-pane -s %1'
62 bind i select-pane -t :.+
63 bind C-i select-pane -t :.+
64 bind I select-pane -t :.-
66 bind . select-layout even-vertical
67 bind , select-layout tiled
68 # Simulate maximising the window.
69 bind / select-layout even-vertical \; swap-pane -s top \; resize-pane -D 9999
72 # Set current window title.
73 bind t command-prompt -p "Set window's title to:" 'rename-window %1'
76 # Monitor window for a particular string.
77 bind m command-prompt -p "Monitor:" 'setw monitor-content %1'
78 bind M setw monitor-content ""
80 bind \; setw synchronize-panes
81 # Choose buffer to paste.
82 bind } choose-buffer 'paste-buffer -b %%'
83 # Enter copy-mode and scroll up.
85 # Choose buffer to show.
86 # XXX: As of tmux 1.3 this doesn't work.
87 #bind '"' choose-buffer 'show-buffer -b %%'
88 bind '"' list-buffers \; command-prompt -p "Choose buffer to show:" 'show-buffer -b %1'
91 ################################################################################
92 # Fix missing binds in Vi modes.
93 ################################################################################
95 bind -t vi-edit C-u delete-line
96 # We can't delete a word so ^w can clear the whole line for now.
97 bind -t vi-edit C-w delete-line
98 bind -t vi-edit Up history-up
99 bind -t vi-edit Down history-down
100 bind -t vi-edit Left cursor-left
101 bind -t vi-edit Right cursor-right
103 bind -t vi-copy y copy-selection
105 ################################################################################
107 ################################################################################
108 set -g default-terminal 'screen-256color'
109 # PuTTY needs help to set bold colours.
110 set -g terminal-overrides 'putty-256color:C8'
112 ################################################################################
113 # Window and pane settings.
114 ################################################################################
115 set -g display-panes-time 1000
116 set -g display-panes-active-colour white
117 set -g display-panes-colour colour17
119 set -g message-bg colour90
120 set -g message-fg white
122 set -g pane-active-border-bg default
123 set -g pane-active-border-fg white
125 set -g pane-border-bg default
126 set -g pane-border-fg colour17
129 setw -g mode-fg white
130 # Monitored windows (in reverse video).
131 setw -g window-status-alert-bg red
132 setw -g window-status-alert-fg white
134 ################################################################################
136 ################################################################################
137 # Don't update the title bar.
138 set -g set-titles off
139 # Status line black on white.
140 set -g status-attr none
141 set -g status-bg white
142 set -g status-fg black
143 # Current window white on blue.
144 setw -g window-status-current-attr none
145 setw -g window-status-current-bg colour17
146 setw -g window-status-current-fg white
148 set -g status-left ''
149 set -g status-right '#[fg=white,bg=colour8][#H:#S]'
151 setw -g window-status-current-format '[#I.#P#F #W]'
152 setw -g window-status-format ' #I.#P#F #W '
153 # Don't set window name. XXX: Issue with PROMPT_COMMAND.
154 #setw -g automatic-rename off