forked from mathiasbynens/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
36 lines (28 loc) · 1.44 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
# 256 colors for vim
set -g default-terminal "xterm"
# Cycle panes with C-b C-b
unbind ^B
bind ^B select-pane -t :.+
# Reload config with a key
bind-key r source-file ~/.tmux.conf \; display "Config reloaded!"
# Scrolling works as expected
# set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# Use the system clipboard
# set-option -g default-command "reattach-to-user-namespace -l bash"
# Clear the pane and it's history
bind -n C-k send-keys C-l \; clear-history
# C-l is taken over by vim style pane navigation
bind C-l send-keys 'C-l'
# 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"
# Rename your terminals
# set -g set-titles on
# set -g set-titles-string '#(whoami)::#h::#(curl ipecho.net/plain;echo)'
# set -g status off
setw -g mode-mouse on
set -g mouse-resize-pane on
set -g mouse-select-window on