-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.tmux.conf
More file actions
59 lines (44 loc) · 1.73 KB
/
.tmux.conf
File metadata and controls
59 lines (44 loc) · 1.73 KB
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
# The "theme" of this config is tu use the Meta key (Alt) to do most
# of the operations in tmux. So in terms of moving around, tmux will
# behave just like vim, but the Alt key is used.
# The reason for this is to separate tmux from vim so that you can
# use the following rationale:
# I want to do something in vim. OK, I use Ctrl
# I want to do sometthing in tmux. OK, I use Alt
# Change prefix:
set -g prefix M-a # Alt + a
bind-key a send-prefix # for nested tmux sessions
# Reload this config on the fly
bind -n M-r source-file ~/.tmux.conf # Alt + r
# Window splitting
unbind %
unbind '"'
bind | split-window -h # Alt + a + |
bind - split-window -v # Alt + a + -
# Resizing: since it's not a very common operation, use the
# arrows and the Meta key (Alt)
bind -n M-Left resize-pane -L 1 # Alt + Left
bind -n M-Right resize-pane -R 1 # Alt + Right
bind -n M-Up resize-pane -U 1 # Alt + Up
bind -n M-Down resize-pane -D 1 # Alt + Down
# Colors - WHY IS THIS NOT WORKING?
set-option -g default-terminal "screen-256color"
# Switch panes as in vim, but use Meta (Alt) instead of Ctrl
# Alt-j moves down, for example (no prefix)
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
# Enable mouse control (clickable windows, panes, resizable panes)
# This will allow you to select panes, resize panes, and scroll
# However, to quit scroll mode you need to press q. Just that,
# no prefix or anything
set -g mouse on
# Windows
bind-key -r M-h select-window -t :- # Alt + a + Alt + h
bind-key -r M-l select-window -t :+ # Alt + a + Alt + h
# Start window numbers at 1
set -g base-index 1
set-window-option -g pane-base-index 1
# Renumber windows after closing them
set -g renumber-windows on