Alternate binding for split-pane.
[profile.git] / .tmux.conf
1 ################################################################################
2 # Options.
3 ################################################################################
4 # Use vi keys for scrolling etc.
5 # Use lsk -t vi|emacs-<table> to see binds in table choice, copy or edit.
6 setw -g mode-keys vi
7 set -g status-keys vi
8
9 # Don't wait so long to parse escape sequences.
10 set -s escape-time 100
11
12 # Clock.
13 setw -g clock-mode-colour white
14 setw -g clock-mode-style 24
15
16 # Scrollback buffer.
17 set -g history-limit 4096
18
19 ################################################################################
20 # Screen compatibility.
21 ################################################################################
22 set -g prefix C-p
23 unbind C-b
24 bind C-p last-window
25 bind p send-keys C-p
26 bind C-l refresh-client
27 bind l refresh-client
28 bind S split-window -v
29 bind | split-window -h
30 bind C-[ copy-mode
31 bind ] paste-buffer
32 bind C-] paste-buffer
33 bind _ setw monitor-activity
34 bind * list-clients
35 bind < command-prompt -p "Load buffer from file:" 'load-buffer %1'
36 bind > command-prompt -p "Save buffer to file:" 'save-buffer %1'
37
38 ################################################################################
39 # Hotkeys.
40 ################################################################################
41 # Up and down like Vim.
42 bind j select-pane -D
43 bind C-j select-pane -D
44 bind k select-pane -U
45 bind C-k select-pane -U
46 # Previous and next panes kinda like Vim.
47 bind h select-pane -L
48 bind C-h select-pane -L
49 bind l select-pane -R
50 bind C-l select-pane -R
51 # And for windows.
52 bind H previous-window
53 bind L next-window
54 # Last window like Vim.
55 bind ^ last-window
56 bind C-^ last-pane
57 # Top and bottom.
58 bind J select-pane -D
59 bind K select-pane -U
60 # Swap panes.
61 bind w swap-pane
62 # Show panes.
63 bind = display-panes
64 # Move the current pane into a separate window.
65 bind b break-pane
66 # Split another pane into this window.
67 bind B command-prompt -p "Select [<window>.]<pane> to join:" 'join-pane -s %1'
68 # Split vertically.
69 bind C-\ split-window -v
70 # Next pane.
71 bind i select-pane -t :.+
72 bind C-i select-pane -t :.+
73 bind I select-pane -t :.-
74 # Layouts.
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
79 # Show windows
80 bind - list-windows
81 # Set current window title.
82 bind t command-prompt -p "Set window's title to:" 'rename-window %1'
83 # Show clock.
84 bind T clock-mode
85 # Monitor window for a particular string.
86 bind m command-prompt -p "Monitor:" 'setw monitor-content %1'
87 bind M setw monitor-content ""
88 # Synchronise input.
89 bind \; setw synchronize-panes
90 # Choose buffer to paste.
91 bind } choose-buffer 'paste-buffer -b %%'
92 # Enter copy-mode and scroll up.
93 bind { copy-mode -u
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'
98 bind "'" show-buffer
99
100 ################################################################################
101 # Fix missing binds in Vi modes.
102 ################################################################################
103 # Command prompt.
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
111 # Copy mode.
112 bind -t vi-copy y copy-selection
113
114 ################################################################################
115 # Terminal settings.
116 ################################################################################
117 set -g default-terminal 'screen-256color'
118 # PuTTY needs help to set bold colours.
119 set -g terminal-overrides 'putty-256color:C8'
120
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
127 # Command entry.
128 set -g message-bg colour90
129 set -g message-fg white
130 # Active pane
131 set -g pane-active-border-bg default
132 set -g pane-active-border-fg white
133 # Inactive pane.
134 set -g pane-border-bg default
135 set -g pane-border-fg colour17
136 # Messages.
137 setw -g mode-bg blue
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
142
143 ################################################################################
144 # Caption settings.
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
156 # No border.
157 set -g status-left ''
158 set -g status-right '#[fg=white,bg=colour8][#H:#S]'
159 # Window flags.
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