-
Notifications
You must be signed in to change notification settings - Fork 4
/
tmux.conf
138 lines (101 loc) · 3.6 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
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# start numbering at 1
set-option -g base-index 1
# create a default session on server start
new-session
set -g prefix C-s
unbind C-b
bind C-s send-prefix
# update env
set -g update-environment -r
# Add dim color support
set -sa terminal-overrides ",*:dim=\\E[2m"
# Clear buffer
bind C-l send-keys -R \; clear-history
# support for 256 colors
set-option -g default-terminal "screen-256color"
# make pbcopy & pbpaste to work in OS X
if-shell 'test "$(uname)" = "Darwin"' \
'set-option -g default-command "tmux rename-window shell; reattach-to-user-namespace -l $SHELL"'
# bind vi key-mapping
set-option -g status-keys vi
# vi-style controls for copy mode
set-window-option -g mode-keys vi
# large history
set-option -g history-limit 100000
# highlight status bar on activity
set-window-option -g monitor-activity off
set-option -g visual-activity on
set-option -g visual-bell off
# automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
# force a reload of the config file
bind r source-file ~/.tmux.conf
# default statusbar colors
set-option -g status-style fg=colour244,bg=colour234
# default window title colors
set-window-option -g window-status-style fg=colour244,bg=default,dim
# active window title colors
set-window-option -g window-status-current-style fg=colour254,bg=default,none
# activity window colors
set-window-option -g window-status-activity-style bg=default
# pane border
set-option -g pane-border-style fg=colour235
set-option -g pane-active-border-style fg=colour240
# message text
set-option -g message-style fg=colour7,bg=colour235
# pane number display
set-option -g display-panes-active-colour colour4
set-option -g display-panes-colour colour7
# clock
set-window-option -g clock-mode-colour colour214
# splitting windows into panes with h and v
bind-key h split-window -v -c "#{pane_current_path}"
bind-key v split-window -h -c "#{pane_current_path}"
# create new window with the current directory
bind-key c new-window -c "#{pane_current_path}"
# set up resize-pane keys
bind-key -r > resize-pane -R 3
bind-key -r < resize-pane -L 3
bind-key -r - resize-pane -D 1
bind-key -r = resize-pane -U 1
# shift + arrows to switch windows (w/o prefix key)
bind -n S-Left previous-window
bind -n S-Right next-window
# set up swap-pane keys
bind-key [ swap-pane -U
bind-key ] swap-pane -D
# mouse mode
set -g mouse on
# report focus events
set -g focus-events on
# remove time and hostname in status bar
set-option -g status-left '#S '
set-option -g status-right ''
# set up copy and paste keys
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'V' send -X select-line
bind-key -T copy-mode-vi 'r' send -X rectangle-toggle
bind-key -T copy-mode-vi 'y' send -X copy-selection
# choose buffer to paste interactively
bind-key o choose-buffer
# delete the most recently copied buffer of text
bind-key x delete-buffer
# toggle statusbar
bind-key b set status
# disable delay between characters in commands
set-option -s escape-time 0
# load local overrides
if-shell "test -f ~/.tmux.local.conf" "source-file ~/.tmux.local.conf"
# copy to system clipboard over ssh
bind-key y run-shell '"tmux show-buffer | ssh localhost -p 2244 pbcopy"; display-message "Copied tmux buffer to system clipboard"'
set-option -g @resurrect-save 'S'
set-option -g @resurrect-restore 'R'
run-shell "$DOTFILES_PATH/tmux/plugins/resurrect/resurrect.tmux"
run-shell "$DOTFILES_PATH/tmux/plugins/open/open.tmux"
run-shell "$DOTFILES_PATH/tmux/plugins/copycat/copycat.tmux"
run-shell "$DOTFILES_PATH/tmux/plugins/yank/yank.tmux"