-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
58 lines (47 loc) · 1.81 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
# Update environment on start or attach (fixes stale ssh-agent sessions)
set -g update-environment "DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY"
set-option -g history-limit 3000
# Use vim keybindings in copy mode
setw -g mode-keys vi
# y and p as in vim
bind-key -t vi-copy Y copy-end-of-line
bind Escape copy-mode
unbind p
bind p paste-buffer
bind -t vi-copy v begin-selection
bind -t vi-copy y copy-selection
bind -t vi-copy 'Space' halfpage-down
bind -t vi-copy 'Bspace' halfpage-up
# easy-to-remember split pane commands
bind c new-window -c "#{pane_current_path}"
bind | split-window -h -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind '"' split-window -v -c "#{pane_current_path}"
bind h select-pane -L
bind j select-pane -D
bind C-j select-pane -D
bind k select-pane -U
bind C-k select-pane -U
bind l select-pane -R
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
# Send prefix to nested sessions
bind b send-prefix
# Set up mouse
set -g mouse-utf8 on
# currently, mac is at tmux 2.1 and linux mint is at 1.8
# we might need to do something like `if-shell "[[ `tmux -V | cut -d' ' -f2` -ge 1.9 ]]"`
if-shell "uname | grep -q Darwin" "source-file ~/dotfiles/.tmux-macosx" "source-file ~/dotfiles/.tmux-linux"
run-shell "powerline-daemon -q"
source "/usr/local/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf"
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @continuum-restore 'on'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'