-
Notifications
You must be signed in to change notification settings - Fork 7
/
.tmux.conf
89 lines (66 loc) · 1.94 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
# GENERAL SETTINGS
# 256 colors terminal
set-option -g default-terminal screen-256color
# Enable mouse support in ~/.tmux.conf
set-option -g mouse-resize-pane on
set-option -g mouse-select-pane on
set-option -g mouse-select-window on
set-window-option -g mode-mouse on
# Less stretching to get to the first item
set -g base-index 1
setw -g pane-base-index 1
# Autorename sanely
setw -g automatic-rename on
# Copy mode
setw -g mode-keys vi
bind [ copy-mode
unbind p
bind p paste-buffer
bind -t vi-copy v begin-selection
bind -t vi-copy y copy-selection
# Highlight active window
set-window-option -g window-status-current-bg colour148
# KEYS
# Use keys from xterm
set -g xterm-keys on
# Global prefix is Alt-e
unbind C-b
set -g prefix M-e
bind M-e send-prefix
# force a reload of the config file
unbind r
bind-key r source-file ~/.tmux.conf \; display "Config reloaded!"
# Pane movement (Alt + hjkl)
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
# Pane split (Alt + \-))
bind -n M-\ split-window -h
bind -n M-- split-window -v
# Pane split (vs)
bind v split-window -h
bind s split-window -v
# Pane layout (Alt + =+)
bind -n M-= select-layout even-horizontal
bind -n M-+ select-layout even-vertical
# Pane resizing (Alt + Arrow Up/Down/Left/Right)
bind-key -nr M-Up resize-pane -U 2
bind-key -nr M-Down resize-pane -D 2
bind-key -nr M-Left resize-pane -L 2
bind-key -nr M-Right resize-pane -R 2
# Pane switching (Alt + np)
bind -n M-n select-pane -t :.+
bind -n M-p select-pane -t :.-
# Switching to last pane (Alt + e)
bind-key M-e last-pane
# PLUGINS
# tmux-powerline
set-option -g status on
set-option -g status-interval 2
set-option -g status-utf8 on
set-option -g status-justify "centre"
set-option -g status-left-length 32
set-option -g status-right-length 90
set-option -g status-left "#(~/.tmux/tmux-powerline/status-left.sh)"
set-option -g status-right "#(~/.tmux/tmux-powerline/status-right.sh)"