-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
96 lines (71 loc) · 2.36 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
# Powerline
source /usr/local/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf
set-option -g status on
set-option -g status-utf8 on
set -g status on
set -g status-utf8 on
# # Powerline symbols:
set -g status-interval 10
# change the prefix from 'C-b' to 'C-c'
# (remap capslock to CTRL for easy access)
unbind C-b
set-option -g prefix C-c
bind-key C-c send-prefix
# start with window 1 (instead of 0)
set -g base-index 1
# start with pane 1
set -g pane-base-index 1
# scrolling
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
set -g mode-mouse on
# split panes using | and -
bind v split-window -h
bind s split-window -v
unbind '"'
unbind %
# (Control + Shift + Up/Down/Left/Right) to resize panes
bind-key -n S-Up resize-pane -U
bind-key -n S-Down resize-pane -D
bind-key -n S-Left resize-pane -L
bind-key -n S-Right resize-pane -R
# reload config file
bind r source-file ~/.tmux.conf
unbind p
bind p previous-window
# shorten command delay
set -sg escape-time 1
# don't rename windows automatically
set-option -g allow-rename off
# mouse control (clickable windows, panes, resizable panes)
set -g mouse-select-window on
set -g mouse-select-pane on
set -g mouse-resize-pane on
# Use Ctrl-arrow keys without prefix key to switch panes
bind -n C-S-Left select-pane -L
bind -n C-S-Right select-pane -R
bind -n C-S-Up select-pane -U
bind -n C-S-Down select-pane -D
# enable vi mode keys
set-window-option -g mode-keys vi
bind -t vi-copy 'v' begin-selection
bind -t vi-copy 'y' copy-selection
# set default terminal mode to 256 colors
set -g default-terminal "screen-256color"
# fix pbcopy/pbpaste
if 'command -v reattach-to-user-namespace >/dev/null' \
'set -gq @osx-pasteboard true'
if 'tmux show -gv @osx-clipboard' \
'set -g default-command "reattach-to-user-namespace -l $SHELL"'
# present a menu of URLs to open from the visible pane. sweet.
bind-key u capture-pane \;\
save-buffer /tmp/tmux-buffer \;\
split-window -l 10 "urlview /tmp/tmux-buffer"
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
# Last saved environment is automatically restored when tmux is started.
set -g @continuum-restore 'on'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'