-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.tmux.conf
More file actions
83 lines (63 loc) · 2.17 KB
/
.tmux.conf
File metadata and controls
83 lines (63 loc) · 2.17 KB
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
set-option -g status-position top
set -g prefix C-a
unbind C-b
set -g base-index 1
setw -g pane-base-index 1
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind -n M-h select-pane -L
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
# create new window
bind N new-window -c "#{pane_current_path}"
# create new panes
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
# synchronize all panes in a window
bind y setw synchronize-panes
# move between windows
bind C-p previous-window
bind C-n next-window
# reload tmux config file
bind r source-file ~/.tmux.conf \; display ".tmux.conf reloaded!"
# address vim mode switching delay (http://superuser.com/a/252717/65504)
set -s escape-time 0
# increase scrollback buffer size
set -g history-limit 50000
# upgrade $TERM
set -g default-terminal "screen-256color"
# copy mode using 'Esc'
unbind [
bind Escape copy-mode
bind p paste-buffer
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"
# focus events enabled for terminals that support them
set -g focus-events on
# tmux messages are displayed for 4 seconds
set -g display-time 2000
# allow changing focus with mouse
set -g mouse on
# super useful when using "grouped sessions" and multi-monitor setup
setw -g aggressive-resize on
# Styling
set -g status-keys vi
set -g status-justify left
set -g status-style fg=colour136,bg=default
set -g status-left-length 120
set -g status-left ""
set -g status-right "#[fg=green] #S #[default]"
set -g window-status-format '#[fg=white]#I:#(pwd="#{pane_current_path}"; echo ${pwd####*/})'
set -g window-status-current-format '#[fg=yellow][#I:#(pwd="#{pane_current_path}"; echo ${pwd####*/})]'
if-shell 'test "$SSH_CONNECTION"' 'set -g status-bg red'
# Plugins
set -g @plugin "tmux-plugins/tpm"
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-yank'
# initialize tpm
run -b '~/.tmux/plugins/tpm/tpm'