-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.keybindings
27 lines (20 loc) · 939 Bytes
/
.tmux.keybindings
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
# Keybindings
# Smart pane switching with awareness of vim splits
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(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"
bind -n M-h resize-pane -L
bind -n M-j resize-pane -D
bind -n M-k resize-pane -U
bind -n M-l resize-pane -R
bind -n M-s set synchronize-panes
bind-key -n F2 new-window -c "#{pane_current_path}"
bind-key -n F3 display-panes \; split-window -h -c "#{pane_current_path}"
bind-key -n F4 display-panes \; split-window -v -c "#{pane_current_path}"
bind-key -n F5 previous-window
bind-key -n F6 next-window
bind-key -n F8 copy-mode
bind-key -n F12 detach