-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtmux.conf.symlink
41 lines (31 loc) · 1.25 KB
/
tmux.conf.symlink
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
# use ctrl a
unbind C-b
set -g prefix C-a
bind C-a send-prefix
source-file "${HOME}/dotfiles/tmux/base16.tmuxtheme"
#set window and pane index to 1 (0 by default)
set-option -g base-index 1
setw -g pane-base-index 1
set -g mouse on
set-option -g status-position top # put status bar on top
set-option -g status on # turn the status bar on
# visual notification of activity in other windows
setw -g monitor-activity on
set -g visual-activity on
# Use vim keybindings in copy mode
setw -g mode-keys vi
# try to make splits open in cwd
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# speed up excape key
set -sg escape-time 0
bind-key -r "<" swap-window -t -1
bind-key -r ">" swap-window -t +1
# smart pane switching with awareness of vim splits
is_vim_or_emacs='echo "#{pane_current_command}" \
| grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$|emacs"'
bind -n C-h if-shell "$is_vim_or_emacs" "send-keys C-h" "select-pane -L"
bind -n C-j if-shell "$is_vim_or_emacs" "send-keys C-j" "select-pane -D"
bind -n C-k if-shell "$is_vim_or_emacs" "send-keys C-k" "select-pane -U"
bind -n C-l if-shell "$is_vim_or_emacs" "send-keys C-l" "select-pane -R"