-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
70 lines (57 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
68
69
70
# remap prefix to Control + a
set -g prefix C-a
unbind C-b
bind C-a send-prefix
#clear screen w/ prefix 'c-l'
bind C-l send-keys 'C-l'
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf
# quick pane cycling
unbind ^A
bind ^A select-pane -t :.+
#vim scrolling history
setw -g mode-keys vi
set -g status-keys vi
bind-key -t vi-edit Up history-up
bind-key -t vi-edit Down history-down
#setup v to begin selection, y to yank
bind-key -t vi-copy v begin-selection
bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
#Update default binding of `Enter` to also use copy-pipe
unbind -t vi-copy Enter
bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
#clock
set -g clock-mode-style 12
set -g default-terminal "screen-256color"
set -g utf8 on
set -g status-utf8 on
setw -g aggressive-resize on
# status bar
set-option -g status-position top
set -g status-bg colour241
set -g status-fg black
set -g status-left ""
set -g status-right "#[fg=white]{#S} #[fg=white] %d %b %Y"
# active window title colors
set-window-option -g window-status-current-fg white
set-window-option -g window-status-current-bg default
# Smart pane switching with awareness of vim splits
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"'
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
# Resizing pages
bind -r H resize-pane -L 10
bind -r J resize-pane -D 10
bind -r K resize-pane -U 10
bind -r L resize-pane -R 10
bind C-p previous-window
bind C-n next-window
bind-key y set-window-option synchronize-panes
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'