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
12 # Ensure KRB5CCNAME is preserved in the environment.
13 set -a -g update-environment ' KRB5CCNAME'
16 setw -g clock-mode-colour white
17 setw -g clock-mode-style 24
19 ################################################################################
20 # Screen compatibility.
21 ################################################################################
25 bind C-l refresh-client
27 bind S split-window -v
28 bind | split-window -h
32 bind _ setw monitor-activity
34 bind < command-prompt -p "Load buffer from file:" 'load-buffer %1'
35 bind > command-prompt -p "Save buffer to file:" 'save-buffer %1'
37 ################################################################################
39 ################################################################################
40 # Up and down like Vim.
42 bind C-j select-pane -D
44 bind C-k select-pane -U
45 # Previous and next window kinda like Vim.
46 bind h previous-window
47 bind C-h previous-window
54 bind J select-pane -t bottom
55 bind K select-pane -t top
60 # Move the current pane into a separate window.
62 # Split another pane into this window.
63 bind B command-prompt -p "Select [<window>.]<pane> to join:" 'join-pane -s %1'
65 bind i select-pane -t :.+
66 bind C-i select-pane -t :.+
67 bind I select-pane -t :.-
69 bind . select-layout even-vertical
70 bind , select-layout tiled
71 # Simulate maximising the window.
72 bind / select-layout even-vertical \; swap-pane -s top \; resize-pane -D 9999
75 # Set current window title.
76 bind t command-prompt -p "Set window's title to:" 'rename-window %1'
79 # Monitor window for a particular string.
80 bind m command-prompt -p "Monitor:" 'setw monitor-content %1'
81 bind M setw monitor-content ""
83 bind \; setw synchronize-panes
84 # Choose buffer to paste.
85 bind } choose-buffer 'paste-buffer -b %%'
86 # Enter copy-mode and scroll up.
88 # Choose buffer to show.
89 # XXX: As of tmux 1.3 this doesn't work.
90 #bind '"' choose-buffer 'show-buffer -b %%'
91 bind '"' list-buffers \; command-prompt -p "Choose buffer to show:" 'show-buffer -b %1'
94 ################################################################################
95 # Fix missing binds in Vi modes.
96 ################################################################################
98 bind -t vi-edit C-u delete-line
99 # We can't delete a word so ^w can clear the whole line for now.
100 bind -t vi-edit C-w delete-line
101 bind -t vi-edit Up history-up
102 bind -t vi-edit Down history-down
103 bind -t vi-edit Left cursor-left
104 bind -t vi-edit Right cursor-right
106 bind -t vi-copy y copy-selection
108 ################################################################################
110 ################################################################################
111 set -g default-terminal 'screen-256color'
112 # PuTTY needs help to set bold colours.
113 set -g terminal-overrides 'putty-256color:C8'
115 ################################################################################
116 # Window and pane settings.
117 ################################################################################
118 set -g display-panes-time 1000
119 set -g display-panes-active-colour white
120 set -g display-panes-colour colour17
122 set -g message-bg colour90
123 set -g message-fg white
125 set -g pane-active-border-bg default
126 set -g pane-active-border-fg white
128 set -g pane-border-bg default
129 set -g pane-border-fg colour17
132 setw -g mode-fg white
133 # Monitored windows (in reverse video).
134 setw -g window-status-alert-bg red
135 setw -g window-status-alert-fg white
137 ################################################################################
139 ################################################################################
140 # Don't update the title bar.
141 set -g set-titles off
142 # Status line black on white.
143 set -g status-attr none
144 set -g status-bg white
145 set -g status-fg black
146 # Current window white on blue.
147 setw -g window-status-current-attr none
148 setw -g window-status-current-bg colour17
149 setw -g window-status-current-fg white
151 set -g status-left ''
152 set -g status-right '#[fg=white,bg=colour8][#H:#S]'
154 setw -g window-status-current-format '[#I.#P#F #W]'
155 setw -g window-status-format ' #I.#P#F #W '
156 # Don't set window name. XXX: Issue with PROMPT_COMMAND.
157 #setw -g automatic-rename off