-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.tmux.conf
78 lines (59 loc) · 2.05 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
#set-option -g default-terminal "screen-256color"
set-option -g default-terminal "xterm-256color"
set -g status-keys vi
set -g history-limit 10000
set-option -g set-titles on
setw -g mode-keys vi
setw -g monitor-activity on
set -g mouse off
# Unbind vim keys
unbind C-n
unbind C-m
# Vim copy/paste history
bind-key -T copy-mode-vi 'v' send-keys -X begin-selection
bind-key -T copy-mode-vi 'y' send-keys -X copy-selection-and-cancel
unbind -n C-y
bind -n C-y copy-mode
unbind -n C-p
bind -n C-p paste-buffer
# Prefix
unbind C-Space
set-option -g prefix C-Space
bind -n C-b send-prefix
# Windows
bind C-h select-pane -L
bind C-l select-pane -R
bind C-k select-pane -U
bind C-j select-pane -D
bind -r h resize-pane -L
bind -r l resize-pane -R
bind -r k resize-pane -U
bind -r j resize-pane -D
bind C-r select-pane -l
bind C-f resize-pane -Z
bind | split-window -h
bind - split-window -v
bind-key b last-window
# Search back to last prompt. Searches for non-breaking space in prompt.
bind -n -r C-g copy-mode\; send-keys -X start-of-line\; send-keys -X search-backward " "
#set -g status-interval 1
#set -g status-left-length 150
#set -g automatic-rename on
## set-option -g automatic-rename-format '#{b:pane_current_path}'
#set -g status-left "#{pane_current_path} "
bind r source-file ~/.tmux.conf
bind Y setw synchronize-panes\; display-message "sync panes #{?pane_synchronized,on,off}"
# SSH agent reload on tmux attach session: https://stackoverflow.com/a/23187030
set -g update-environment "DISPLAY SSH_ASKPASS SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY"
# set-environment -g SSH_AUTH_SOCK $HOME/.ssh/ssh-auth-sock.$HOSTNAME
set-environment -g SSH_AUTH_SOCK $HOME/.ssh/ssh-auth-sock
source-file ~/.tmux/theme.conf
# TPM plugins
set -g @plugin 'fcsonline/tmux-thumbs'
set -g @thumbs-key g
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-sidebar'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'