master
1# # # # # # # # # # # # # # # # # # # # # # # # #
2# Derived and adapted from Brian P. Hogan's book #
3# tmux: Productive Mouse-Free Development #
4# http://pragprog.com/book/bhtmux/tmux #
5# # # # # # # # # # # # # # # # # # # # # # # # # #
6
7# Setting the prefix from C-b to C-a
8set -g prefix C-a
9
10# Free the original Ctrl-b prefix keybinding
11unbind C-b
12
13#setting the delay between prefix and command
14set -s escape-time 1
15
16# Ensure that we can send Ctrl-A to other apps
17bind C-a send-prefix
18
19# Set the base index for windows to 1 instead of 0
20set -g base-index 1
21
22# Set the base index for panes to 1 instead of 0
23setw -g pane-base-index 1
24
25# Reload the file with Prefix r
26bind r source-file ~/.tmux.conf \; display "Reloaded!"
27
28# splitting panes
29bind | split-window -h
30bind - split-window -v
31
32# moving between panes
33bind h select-pane -L
34bind j select-pane -D
35bind k select-pane -U
36bind l select-pane -R
37
38# Quick pane selection
39bind -r C-h select-window -t :-
40bind -r C-l select-window -t :+
41
42# Pane resizing
43bind -r H resize-pane -L 5
44bind -r J resize-pane -D 5
45bind -r K resize-pane -U 5
46bind -r L resize-pane -R 5
47
48# mouse support - set to on if you want to use the mouse
49
50# Set the default terminal mode to 256color mode
51set -g default-terminal "screen-256color"
52
53# enable vi keys.
54setw -g mode-keys vi
55bind-key -T copy-mode-vi y send-keys -X copy-selection \; send-keys -X cancel
56
57# Log output to a text file on demand
58bind P pipe-pane -o "cat >>~/#W.log" \; display "Toggled logging to ~/#W.log"
59
60set -g pane-border-style fg=white,bg=black
61set -g pane-active-border-style fg=magenta,bg=black
62
63set -g status off