-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
44 lines (33 loc) · 1.33 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
set -g default-terminal "xterm"
set -g terminal-overrides 'xterm:colors=256'
set-window-option -g mode-keys vi
#Allow mouse usage
#set-option -g mouse on
set-option -g allow-rename off
unbind C-b
set -g prefix C-Space
bind Space copy-mode
bind C-Space copy-mode
bind v split-window -h -c "#{pane_current_path}"
bind C-v split-window -h -c "#{pane_current_path}"
bind s split-window -v -c "#{pane_current_path}"
bind C-s split-window -v -c "#{pane_current_path}"
bind-key q kill-window
bind-key C-q kill-window
bind-key x kill-pane
bind-key C-x kill-pane
bind-key c new-window -c "#{pane_current_path}"
# Shift + arrows to resize pane
bind -n S-Left resize-pane -L 2
bind -n S-Right resize-pane -R 2
bind -n S-Down resize-pane -D 1
bind -n S-Up resize-pane -U 1
# Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind-key -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"