-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_tmux.conf
84 lines (66 loc) · 2.27 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
# select, yank in vi mode
setw -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel pbcopy
# increase repeat time for repeatable commands
set -g repeat-time 1000
# start window index at 1
set -g base-index 1
# start pane index at 1
setw -g pane-base-index 1
# renumber windows when one is closed
set -g renumber-windows on
set -g mouse off
set -g history-limit 200000
###########################
# Key Bindings
###########################
# tmux prefix
unbind C-b
set -g prefix C-Space
# resize panes
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# C-Space to quickly switch between panes
bind C-Space select-pane -t :.+
# @ to join a pane into the current one (opposite: ! to break)
bind-key @ command-prompt -p "create pane from:" "join-pane -s ':%%'"
# r to force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf \; display "~/.tmux.conf reloaded"
# Smart pane switching with awareness of vim splits
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?(g?(view|n?vim?x?)(diff)?)$'"
bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D'
bind-key -n 'C-k' if-shell "$is_vim" "send-keys C-k" "select-pane -U"
###########################
# Status Bar
###########################
set -g status-interval 30
set -g status-left ""
setw -g window-status-format "#I:#W "
setw -g window-status-current-format "#I:#W "
set -g status-right '%F %H:%M'
###########################
# Colors
###########################
set -g status-bg colour235
set -g status-fg white
set -g window-status-style bg=colour235,fg=white
set -g window-status-current-style bg=green,fg=black
set -g pane-active-border-style bg=black,fg=green
set -g pane-border-style bg=black,fg=colour235
###########################
# Plugins
###########################
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-open'
# s = open search engine
set -g @open-s 'https://www.google.com/search?q='
# set-environment -g PATH '/usr/local/bin:/bin:/usr/bin'
run '~/.tmux/plugins/tpm/tpm'