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