-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.tmux.conf
54 lines (43 loc) · 1.73 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
set -g mouse on
# Use Ctrl + a as prefix
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# Use vi mode
set-window-option -g mode-keys vi
# Smart pane switching with awareness of vim splits
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?x?)(diff)?$"'
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
# Split window
bind-key | split-window -h
bind-key - split-window -v
# Resize panes. Let's hope I don't do it very often
bind-key J resize-pane -D 5
bind-key K resize-pane -U 5
bind-key H resize-pane -L 5
bind-key L resize-pane -R 5
bind-key j resize-pane -D
bind-key k resize-pane -U
bind-key h resize-pane -L
bind-key l resize-pane -R
# copy with 'enter' and send to mac os clipboard: http://goo.gl/2Bfn8
unbind -t vi-copy Enter
bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-yank'
# Restore vim session
set -g @resurrect-strategy-vim 'session'
set -g @resurrect-processes '"~docker-compose up->docker-compose up"'
set -g @resurrect-processes '~python'
run '~/.tmux/plugins/tpm/tpm'
# Powerline for tmux
run-shell "powerline-daemon -q"
# This assumes that powerline is installed with pip
run-shell 'tmux source `pip show powerline-status | grep Location | cut -d ":" -f 2 | xargs`/powerline/bindings/tmux/powerline.conf'