-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
40 lines (29 loc) · 1.52 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
# change prefix to Ctrl+a
unbind C-b
set -g prefix C-a
# smart pane switching with awareness of vim splits (https://robots.thoughtbot.com/seamlessly-navigate-vim-and-tmux-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"
# always open new panes and windows in the same directory
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# set vi-like scrolling
set-window-option -g mode-keys vi
#color pallete
set -g default-terminal "screen-256color"
# always use zsh
set -g default-shell /bin/zsh
#List of plugins for tpm
set -g @plugin 'tmux-plugins/tmux-resurrect'
# plugin specific configs
set -g @resurrect-capture-pane-contents 'on'
# remove esc delay
set -s escape-time 0
# custom history file
set -g history-file ~/.tmux_history
## Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'