-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
65 lines (50 loc) · 1.99 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
set -g @plugin 'tmux-plugins/tpm'
# set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'nhdaly/tmux-better-mouse-mode'
set -g @plugin 'tmux-plugins/tmux-resurrect'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin '[email protected]/user/plugin'
# set -g @plugin '[email protected]/user/plugin'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
# 256 colors!
set -g default-terminal screen-256color
# Start windows and panes at 1, not 0.
set -g base-index 1
set -g pane-base-index 1
# Start the powerline daemon if not already started.
run-shell "powerline-daemon -q"
# Set up powerline. POWERLINE_ROOT must be set to the root of your powerline
# installation (see basrc for example).
source "$POWERLINE_ROOT/powerline/bindings/tmux/powerline.conf"
# Always create a new session. If there's no session running when doing
# "attach" this will automatically create one for us.
new-session -A -s default
# Remove stupid delay in vim.
set -s escape-time 0
# Map prefix to Ctrl-A instead of Ctrl-B (A is easier to reach).
set-option -g prefix C-a
# Shortcuts to switch to next/previous window.
bind -n C-M-h previous-window
bind -n C-M-] next-window
bind -n C-M-[ previous-window
bind -n C-M-l next-window
# Shortcuts for switching up/down/left/right between panes.
bind -n C-k select-pane -U
bind -n C-j select-pane -D
bind -n C-h select-pane -L
bind -n C-l select-pane -R
# Shortcuts for resizing active pane with Meta+j/k/l/h.
bind -n M-j resize-pane -D 1
bind -n M-k resize-pane -U 1
bind -n M-l resize-pane -R 1
bind -n M-h resize-pane -L 1
# Increase scrolling speed.
set -g @scroll-speed-num-lines-per-scroll 7
# Tmux Resurrect plugin settings.
# https://github.com/tmux-plugins/tmux-resurrect
set -g @resurrect-capture-pane-contents 'on'
set -g @resurrect-save-shell-history 'on'
# Copy shit to clipboard (finally found how to do it!)
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'