-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
99 lines (77 loc) · 2.83 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
# Tmux settings
# Settings suggested by Neovim
# Set low escape time for TMUX
set -s escape-time 0
# Increase scrollback buffer size from 2000 to 50000 lines
set -g history-limit 50000
# Increase tmux messages display duration from 750ms to 4s
set -g display-time 4000
# Enabled focus events
set-option -g focus-events on
# Set start index to 1 (instead of 0) for windows and panes
set -g base-index 1
set -g pane-base-index 1
set-window-option -g pane-base-index 1
set-option -g renumber-windows on
# change key binding from C-b to \
unbind C-b
set-option -g prefix '\'
bind '\' send-prefix
# set vi binding in copy mode
setw -g mode-keys vi
# make coping move vi-like
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 P paste-buffer
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
bind Space copy-mode
# So we can still use \ when needed - press prefix and C-b/C-v
bind C-b set -g prefix C-b
bind C-v set -g prefix '\'
# Enables 256 colors
set-option -g default-terminal "tmux-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc"
set -g mouse on
# use PREFIX | to split window horizontally and PREFIX - to split vertically
bind | split-window -hc "#{pane_current_path}"
bind - split-window -vc "#{pane_current_path}"
# Toggle synchronize panes in tmux
bind m setw synchronize-panes
# vim-like movement around the panes
bind h select-pane -L
bind l select-pane -R
bind k select-pane -U
bind j select-pane -D
bind u display-panes
# enable closing tmux window viw Prefix+&
# bind q killp
# reload config file
# (change file location to your the tmux.conf you want to use)
bind r source-file ~/.tmux.conf
# Better status bar format
# set -g status off # turn off the status bar
set-window-option -g status-left " #S "
set-window-option -g status-left-style fg=black,bg=green
set-window-option -g status-right " %H:%M %d-%b-%y "
set-window-option -g status-right-style fg=black,bg=green
set-window-option -g window-status-format " #I: #W "
set-window-option -g window-status-current-format " #I: #W "
set-window-option -g window-status-current-style fg=green,bg=black
set-window-option -g mode-keys vi
# set inactive/active window styles
# set -g window-style 'fg=colour247,bg=colour236'
# set -g window-active-style 'fg=colour250,bg=black'
set -g window-style 'fg=default,bg=default'
set -g window-active-style 'fg=default,bg=default'
# Continuum plugin setting
set -g @continuum-restore 'on'
set -g @continuum-boot 'on'
set -g @continuum-boot-options 'iterm'
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
# Initialize TMUX plugin manager (keep this line at the very bottom of
# tmux.conf)
run '~/.tmux/plugins/tpm/tpm'