-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
137 lines (103 loc) · 3.08 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# Default terminal
set-option -g default-terminal "screen-256color"
# Use vim key bindings
set-option -g mode-keys vi
set-option -g status-keys vi
# Turn the mouse on
set -g mouse on
# Time in milliseconds for which tmux waits after an escape
set-option -g escape-time 0
# Enable supported focus events
set-option -g focus-events on
# History settings
set-option -g history-limit 10000
set-option -g history-file ~/.tmux/tmuxhistory
# Activity
set-option -g monitor-activity on
set-option -g visual-activity off
# Start window index at 1
set-option -g base-index 1
# Set terminal title
set -g set-titles on
# Start pane index at 1
set-option -g pane-base-index 1
# Rename window to reflect current program
set-window-option -g automatic-rename on
# Renumber windows when one is closed
set-option -g renumber-windows on
# No bells at all
set -g bell-action none
# No visual bell
set -g visual-bell off
# Enable RGB color if running in xterm
set -g default-terminal "tmux-256color"
# Unbind default prefix key
unbind-key C-b
# Set default prefix key
set-option -g prefix C-a
# Bind "C-a C-a" to send "C-a"
bind-key C-a send-prefix
# Reload configuration
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
# Switch panes
bind-key -n C-h select-pane -L
bind-key -n C-j select-pane -D
bind-key -n C-k select-pane -U
bind-key -n C-l select-pane -R
# Switch windows
bind-key -n C-1 select-window -t:1
bind-key -n C-2 select-window -t:2
bind-key -n C-3 select-window -t:3
bind-key -n C-4 select-window -t:4
bind-key -n C-5 select-window -t:5
bind-key -n C-6 select-window -t:6
bind-key -n C-7 select-window -t:7
bind-key -n C-8 select-window -t:8
bind-key -n C-9 select-window -t:9
bind-key -n C-0 select-window -t:10
bind-key -n M-Left previous-window
bind-key -n M-Right next-window
# Split pane with same directory
unbind-key '"'
unbind-key %
bind-key - split-window -v -c "#{pane_current_path}"
bind-key \\ split-window -h -c "#{pane_current_path}"
bind-key _ split-window -fv -c "#{pane_current_path}"
bind-key | split-window -fh -c "#{pane_current_path}"
# Resize panes
bind-key -n M-h resize-pane -L 2
bind-key -n M-j resize-pane -D 1
bind-key -n M-k resize-pane -U 1
bind-key -n M-l resize-pane -R 2
# Toggle zoom
bind-key -n C-z resize-pane -Z
# Move panes
unbind-key \{
unbind-key \}
bind-key -r H swap-pane -U
bind-key -r L swap-pane -D
# Kill pane
bind-key x kill-pane
# Swap windows across themselves
bind-key -r "<" swap-window -t -1
bind-key -r ">" swap-window -t +1
# Kill window
unbind-key &
bind-key X kill-window
# Enter copy mode
bind-key -n M-v copy-mode
# Select
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi V send-keys -X select-line
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
# Copy
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
# Cancel
bind-key -T copy-mode-vi Escape send-keys -X cancel
# Paste
bind-key p paste-buffer -s ""
bind-key P choose-buffer "paste-buffer -b '%%' -s ''"
# Status position
set-option -g status-position bottom
# Theme
source-file ${HOME}/.themes/tmux-themes/red.tmuxtheme