-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtmux.conf
69 lines (50 loc) · 2.14 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
59
60
61
62
63
64
65
66
67
68
source-file $HOME/.tmux/colors/base16-mariana.conf
# Enable 256 colors
set -g default-terminal "screen-256color"
if 'infocmp -x tmux-256color > /dev/null 2>&1' 'set -g default-terminal "tmux-256color"'
set -s escape-time 10 # faster command sequences
set -sg repeat-time 600 # increase repeat timeout
set -s focus-events on
set -g prefix2 C-a # GNU-Screen compatible prefix
bind C-a send-prefix -2
set -g history-limit 5000 # boost history
# edit configuration
bind e new-window -n "$HOME/.tmux.conf.local" sh -c '${EDITOR:-vim} $HOME/.tmux.conf && tmux source $HOME/.tmux.conf && tmux display^ "$HOME/.tmux.conf sourced"'
# reload configuration
bind r source-file $HOME/.tmux.conf \; display '$HOME/.tmux.conf sourced'
setw -g automatic-rename on # rename window to reflect current program
set -g renumber-windows on # renumber windows when a window is closed
set -g set-titles on # set terminal title
# clear both screen and history
bind -n C-l send-keys C-l \; run 'sleep 0.2' \; clear-history
# activity
set -g monitor-activity on
set -g visual-activity off
# create session
bind C-c new-session
# find session
bind C-f command-prompt -p find-session 'switch-client -t %%'
# session navigation
bind BTab switch-client -l # move to last session
# split current window horizontally
bind - split-window -v
# split current window vertically
bind | split-window -h
# pane navigation
bind -r h select-pane -L # move left
bind -r j select-pane -D # move down
bind -r k select-pane -U # move up
bind -r l select-pane -R # move right
bind > swap-pane -D # swap current pane with the next one
bind < swap-pane -U # swap current pane with the previous one
# window navigation
unbind n
unbind p
bind -r C-h previous-window # select previous window
bind -r C-l next-window # select next window
bind Tab last-window # move to last active window
bind b list-buffers # list paste buffers
bind p paste-buffer -p # paste from the top paste buffer
bind P choose-buffer # choose which buffer to paste from
# Enable mouse mode (tmux 2.1 and above)
set -g mouse on