-
Notifications
You must be signed in to change notification settings - Fork 2
/
tmux.conf
97 lines (79 loc) · 2.31 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# No delay for escape key press
set -g status off
set -sg escape-time 0
set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
set -g base-index 1
setw -g pane-base-index 1
set -g mouse off
unbind C-b
set -g prefix C-a
set-window-option -g mode-keys vi
unbind [
bind Escape copy-mode
unbind -T copy-mode-vi Enter
bind-key ? list-keys
bind-key -T copy-mode-vi v send -X begin-selection
bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel "xclip -i -sel p -f | xclip -i -sel c"
bind y set-window-option synchronize-panes
# bind : to command-prompt like vim
# this is the default in tmux already
bind : command-prompt
# send command to nested tmux with C-a a
bind-key a send-prefix
## Split window
bind-key h split-window -h
bind-key v split-window -v
# Reload tmux config
bind R source-file ~/.tmux.conf \; display-message "Config reloaded"
# Use Alt-vim keys without prefix key to switch panes
bind -n M-h select-pane -L
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
## Swap pane
bind -n C-K swap-pane -U
bind -n C-J swap-pane -D
## Resize pane with Alt (prefix with repeat)
bind -n M-H resize-pane -L 10
bind -n M-J resize-pane -D 10
bind -n M-K resize-pane -U 10
bind -n M-L resize-pane -R 10
# Choose Window
bind-key w choose-window
# New Window with number
bind-key 1 new-window -t 1
bind-key 2 new-window -t 2
bind-key 3 new-window -t 3
bind-key 4 new-window -t 4
bind-key 5 new-window -t 5
bind-key 6 new-window -t 6
bind-key 7 new-window -t 7
bind-key 8 new-window -t 8
bind-key 9 new-window -t 9
bind-key 0 new-window -t 10
# Switch windows alt+number
bind-key -n M-1 select-window -t 1
bind-key -n M-2 select-window -t 2
bind-key -n M-3 select-window -t 3
bind-key -n M-4 select-window -t 4
bind-key -n M-5 select-window -t 5
bind-key -n M-6 select-window -t 6
bind-key -n M-7 select-window -t 7
bind-key -n M-8 select-window -t 8
bind-key -n M-9 select-window -t 9
bind-key -n M-0 select-window -t 10
# Change current pane to next window
bind-key ! join-pane -t :1
bind-key @ join-pane -t :2
bind-key '#' join-pane -t :3
bind-key '$' join-pane -t :4
bind-key '%' join-pane -t :5
bind-key '^' join-pane -t :6
bind-key '&' join-pane -t :7
bind-key '*' join-pane -t :8
bind-key '(' join-pane -t :9
bind-key ')' join-pane -t :10
# Kill Selected Pane
bind-key Q kill-pane