-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
67 lines (51 loc) · 1.95 KB
/
tmux.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Store tmux version in tmux env.
run-shell 'tmux setenv -g TMUX_VERSION $(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")'
# Rebind the prefix key.
unbind C-b
set -g prefix `
bind ` send-prefix
# Reload the .tmux.conf file with <prefix-key> <Ctrl-r>.
bind C-r source-file ~/.tmux.conf \; display-message "Configuration reloaded"
# Improve colors.
set -g default-terminal 'screen-256color'
# Size windows based on clients looking at that window.
setw -g aggressive-resize on
# Use sane split commands.
bind c new-window -c "#{pane_current_path}"
bind | split-window -h -c "#{pane_current_path}"
bind _ split-window -v -c "#{pane_current_path}"
unbind '"'
unbind %
# Start window numbers at 1 to match keyboard order with tmux order.
set -g base-index 1
# Start pane numbers at 1 to match keyboard order with tmux order.
setw -g pane-base-index 1
# Re-enable automatic renaming for the current window.
bind N setw automatic-rename on \; display-message "Automatic rename enabled"
# Re-number windows sequentially after closing any of them.
set -g renumber-windows on
# Increase scrollback lines.
set -g history-limit 65536
# # Allow mouse scrolling of terminal.
# set -g mouse on
# Vim-like pane navigation.
setw -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Easy resizing of panes.
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r H resize-pane -L 5
bind -r L resize-pane -R 5
# Display of active window.
set -g window-status-current-format '#{window_index} #{b:pane_current_path}:#{pane_current_command}*'
# Display of all other windows.
set -g window-status-format '#{window_index} #{b:pane_current_path}:#{pane_current_command}'
# Make sure to update the window title every 5 seconds.
set -g status-interval 5
# Display pane numbers for longer.
set -g display-panes-time 2000
# Allow local customization in ~/.tmux_local.conf.
if-shell "[[ -f ~/.tmux_local.conf ]]" 'source ~/.tmux_local.conf'