-
Notifications
You must be signed in to change notification settings - Fork 2
/
tmux.conf
95 lines (68 loc) · 2.52 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
# vim: ft=sh
# Copy-paste integration
set-option -g default-shell $SHELL
if-shell '[ which reattach-to-user-namespace > /dev/null ]' {
set-option -g default-command "reattach-to-user-namespace -l ${SHELL}"
}
set -g history-limit 9999999
setw -g xterm-keys on
set -g mouse on
# Use vim key bindings for moving around in the buffer
setw -g mode-keys vi
# change prefix to ctrl+w
unbind C-b
set -g prefix C-w
bind C-w send-prefix
# fixing delay on mode-switching in vim
set -sg escape-time 0
# vim like pane navigation
unbind-key j
unbind-key k
unbind-key h
unbind-key l
bind-key j select-pane -D
bind-key k select-pane -U
bind-key h select-pane -L
bind-key l select-pane -R
unbind-key p
unbind-key n
bind p previous-window
bind n next-window
# Make copy pasting a little more Vim like
bind m copy-mode
unbind [
bind P run "xclip -o | tmux load-buffer - ; tmux paste-buffer"
bind -Tcopy-mode-vi H send -X start-of-line
bind -Tcopy-mode-vi L send -X end-of-line
bind -Tcopy-mode-vi v send -X begin-selection
bind -Tcopy-mode-vi c send -X copy-selection
bind -Tcopy-mode-vi Escape send -X cancel
# Copy via 'y' and into system clipboard
bind-key -Tcopy-mode-vi y send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# Options for new splits
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
# bind c new-window -c "#{pane_current_path}"
# colorize messages in the command line
set-option -g message-style bg=black,fg=green
# STATUS-BAR
# center window list for clarity
set -g status-justify centre
set-option -g status-style bg=colour236
set-window-option -g window-status-style bright
set-window-option -g window-status-current-style bg=colour236,bright
set -g status-left-length 70
set -g status-left '#[fg=colour236,bg=white] #S #[fg=colour236,bg=green] #(whoami)@#H #[fg=colour236,bg=blue] #(uptime | cut -d " " -f 3,4,5 | cut -d "," -f 1) #[fg=blue,bg=colour236]#{prefix_highlight}'
set -g status-right-length 70
set -g status-right '#[fg=colour236,bg=green] %R #[fg=colour236,bg=white] %a, %d. %b %Y '
setw -g window-status-format "#[fg=white,nobold,noitalics] #I #W "
setw -g window-status-current-format "#[fg=colour236,bg=green,nobold,noitalics] #I #W "
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
# Other examples:
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
# tmux-continuum settings
set -g @continuum-restore 'on'