-
Notifications
You must be signed in to change notification settings - Fork 2
/
.tmux.conf
93 lines (75 loc) · 2.69 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
# plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-logging'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'nhdaly/tmux-better-mouse-mode'
set -g @plugin 'seebi/tmux-colors-solarized'
set -g @plugin 'soyuka/tmux-current-pane-hostname'
# prefix key
set -g prefix C-a
unbind C-b
bind C-a last-window
bind a send-prefix
# act like vim
set-window-option -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'pbcopy'
bind -T copy-mode-vi Enter send-keys y
bind -T copy-mode-vi MouseDragEnd1Pane send-keys y
bind -T edit-mode-vi Up send-keys -X history-up
bind -T edit-mode-vi Down send-keys -X history-down
bind -T root DoubleClick1Pane copy-mode \; send-keys -X select-word \; send-keys y
# split window
bind c new-window -c "#{pane_current_path}"
bind n new-window -c "#{pane_current_path}"
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind -r H resize-pane -L 1
bind -r L resize-pane -R 1
bind -r K resize-pane -U 1
bind -r J resize-pane -D 1
# move without prefix key
bind -n C-n select-window -t :+
bind -n C-p select-window -t :-
# renumber windows sequentially after closing any of them
set -g renumber-windows on
# mouse
set -g mouse on
set -g @scroll-down-exit-copy-mode "off"
set -g @scroll-speed-num-lines-per-scroll 1
# appearance
set -g set-titles on
set -g set-titles-string "tmux.#I.#W"
set-window-option -g aggressive-resize on
set-window-option -g automatic-rename on
set -g default-terminal "screen-256color"
set -g @colors-solarized '256'
set -g pane-active-border-style fg="yellow"
set -g status-interval 5
set -g status-left-length 20
set -g status-left '#[fg=colour136][#S:#I.#P] '
set -g status-right-length 60
set -g status-right '#{prefix_highlight} #[fg=colour37]#U@#H #[fg=colour64][%Y-%m-%d(%a) %H:%M]'
# increase history buffer
set -g history-limit 500000
# reduce key stroke delay
set -s escape-time 0
# message display time
set -g display-time 2500
# visual notification
set-window-option -g monitor-activity on
set -g visual-activity on
# logging
set -g @logging-path "/var/tmp"
# set default shell
run-shell "tmux set-option -g default-shell $(brew --prefix)/bin/zsh"
run-shell "tmux set-option -g default-command $(brew --prefix)/bin/zsh"
# reload config
bind r source-file ~/.tmux.conf \; display-message "Reload Config!!"
# initialize plugin manager
run '~/.tmux/plugins/tpm/tpm'