-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
58 lines (49 loc) · 2.55 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
############################################################################
# General
############################################################################
# Screen like binding
set -g prefix C-a
unbind-key C-b
bind-key C-a send-prefix
# Use vim keybindings in copy mode
setw -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection
# Enable Mouse
# source: https://apple.stackexchange.com/questions/217166/unknown-option-mode-mouse-with-iterm-tmux/217167#217167
set-option -g mouse on
############################################################################
# Panes
############################################################################
# set first window to index 1 (not 0) to map more to the keyboard layout...
set-option -g base-index 1
set-window-option -g pane-base-index 1
# disable programs changing window names via terminal escape sequence
set-window-option -g allow-rename off
# open new panes and windows with current $PWD
bind '%' split-window -h -c '#{pane_current_path}' # Split panes horizontal
bind '"' split-window -v -c '#{pane_current_path}' # Split panes vertically
bind c new-window -c '#{pane_current_path}' # Create new window
# Pane switching
# 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"
# resize panes with vi-like keybindings
bind j resize-pane -D 10
bind k resize-pane -U 10
bind h resize-pane -L 10
bind l resize-pane -R 10
############################################################################
# Plugins
############################################################################
#set -g @colors-solarized 'dark'
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-resurrect'
#set -g @plugin 'seebi/tmux-colors-solarized'
set -g @plugin 'egel/tmux-gruvbox'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'