-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
47 lines (37 loc) · 1.2 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
set -g prefix C-b
set -g default-terminal "screen-256color"
# split panels binds
bind | split-window -h
bind - split-window -v
# current panel colors
set -g pane-border-style bg=black,fg=green
set -g pane-active-border-style bg=red,fg=white
# move like Vim with panels
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# resize panels with vim keys style
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
# copy/past with vim style
setw -g mode-keys vi
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
bind-key -T copy-mode-vi 'v' send-keys -X begin-selection
bind-key -T copy-mode-vi 'y' send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-cancel "reattach-to-user-namespace pbcopy"
# escape time
set-option -g escape-time 0
# fix macOs Sierra clipboard in vim issue
set -g default-shell $SHELL
set -g default-command "reattach-to-user-namespace -l ${SHELL}"
# synchronize all panes in a window
bind y setw synchronize-panes
# reload config file
bind r source-file ~/.tmux.conf \; display "Config Reloaded!"