-
Notifications
You must be signed in to change notification settings - Fork 5
/
tmux-sanity.conf
119 lines (95 loc) · 2.8 KB
/
tmux-sanity.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# utf8 is on
set -g utf8 on
set -g status-utf8 on
# address vim mode switching delay (http://superuser.com/a/252717/65504)
set -s escape-time 0
# increase scrollback buffer size
set -g history-limit 10000
# tmux messages are displayed for 4 seconds
set -g display-time 2000
# refresh 'status-left' and 'status-right' more often
set -g status-interval 5
# emacs key bindings in tmux command prompt (prefix + :) are better than
# vi keys, even for vim users
set -g status-keys emacs
# Use C-s as a prefix
set -g prefix C-s
unbind C-b
bind C-s send-prefix
# Relax!
set -sg escape-time 0
set -sg repeat-time 600
# Less stretching to get to the first item.
set -g base-index 1
setw -g pane-base-index 1
# Reload the config.
bind r source-file ~/.tmux.conf \; display "Reloaded ~/.tmux.conf"
# Saner splitting.
bind v split-window -h -c '#{pane_current_path}'
bind s split-window -v
bind S choose-session
# Pane movement
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# DVTM style pane selection
bind 1 select-pane -t 1
bind 2 select-pane -t 2
bind 3 select-pane -t 3
bind 4 select-pane -t 4
bind 5 select-pane -t 5
bind 6 select-pane -t 6
bind 7 select-pane -t 7
bind 8 select-pane -t 8
bind 9 select-pane -t 9
# Pane resizing
bind -r C-h resize-pane -L 5
bind -r C-j resize-pane -D 5
bind -r C-k resize-pane -U 5
bind -r C-l resize-pane -R 5
bind -r b select-window -t :-
bind -r n select-window -t :+
# 256 colors please
set -g default-terminal "screen-256color"
# Custom status bar
# Powerline symbols: ⮂ ⮃ ⮀ ⮁ ⭤
set -g status-left-length 32
set -g status-right-length 150
# Status reference
# ----------------
# #(shell-command) First line of the command's output
# #[attributes] Colour or attribute change
# #H Hostname of local host
# #h Hostname of local host without the domain name
# #F Current window flag
# #I Current window index
# #P Current pane index
# #S Session name
# #T Current pane title
# #W Current window name
# ## A literal `#'
#
set -g window-status-activity-attr bold
set -g status-left '#S'
set -g status-right '%R | %d %b'
set -g window-status-format "#I #W "
set -g window-status-current-format "#I #W"
# Activity
setw -g monitor-activity on
set -g visual-activity off
# Autorename sanely.
setw -g automatic-rename on
# Better name management
bind c new-window -c '#{pane_current_path}' \; command-prompt "rename-window '%%'"
bind C new-window -c '#{pane_current_path}'
bind , command-prompt "rename-window '%%'"
# Copy mode
setw -g mode-keys vi
bind ` copy-mode
unbind [
unbind p
bind p paste-buffer
bind -t vi-copy v begin-selection
bind -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
bind -t vi-copy Escape cancel