-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
67 lines (49 loc) · 2.14 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
#run-shell "powerline-daemon -q"
#source "/usr/local/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf"
unbind C-b
set -g prefix C-a
bind-key C-a send-prefix
set-window-option -g mode-keys vi
#set -g default-command 'reattach-to-user-namespace $SHELL --login'
# smart pane switching with awareness of vim splits
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
bind -n C-\\ run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys 'C-\\') || tmux select-pane -l"
# split windows like vim
bind s split-window -v -c "#{pane_current_path}"
bind v split-window -h -c "#{pane_current_path}"
# resize panes like vim
bind < resize-pane -L 10
bind > resize-pane -R 10
bind - resize-pane -D 10
bind + resize-pane -U 10
# vi like select & copy
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-selection
# reload tmux.conf
bind r source-file ~/.tmux.conf
# Windows
bind -n C-[ previous-window
bind -n C-] next-window
bind-key -T prefix : command-prompt
## move windows
bind-key h swap-window -t -1
bind-key l swap-window -t +1
bind-key -n M-[ swap-window -d -t -1
bind-key -n M-] swap-window -d -t +1
set-option -g allow-rename off
set-option -s escape-time 1
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'chriszarate/tmux-tasks'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
set -g default-terminal "xterm-256color"
set-option -g status-position bottom
set-window-option -g xterm-keys on
set-option -ga terminal-overrides ",xterm-256color:Tc"