-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
76 lines (57 loc) · 2.11 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
# set scroll history to 100,000 lines
set-option -g history-limit 100000
# modern colors
set -g default-terminal 'screen-256color'
set -ga terminal-overrides ',*256col*:Tc'
# unbind the prefix and bind it to Ctrl-a
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# copy to X clipboard
bind-key -T copy-mode-vi v send -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"
# shortcut for moving tmux buffer to clipboard
# useful if you've selected with the mouse
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
# Avoid ESC delay
set -s escape-time 0
# Fix titlebar
set -g set-titles on
set -g set-titles-string "#T"
# VIM mode
set -g mode-keys vi
# Mouse friendly
set -g mouse on
# Move between panes with vi keys
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Avoid date/time taking up space
set -g status-right ''
set -g status-right-length 0
bind-key -n -T prefix C-n set status #Ctrl+n Combo
# Clear screen and delete history
bind C-k send-keys -R \; clear-history
# Relative line numbers in vim integration with tmux
set-option -g focus-events on
# Resize panes with hjkl
bind-key -r -T prefix M-k resize-pane -U 5
bind-key -r -T prefix M-j resize-pane -D 5
bind-key -r -T prefix M-h resize-pane -L 5
bind-key -r -T prefix M-l resize-pane -R 5
# bind-key -r -T prefix C-k resize-pane -U
# bind-key -r -T prefix C-j resize-pane -D
bind-key -r -T prefix C-h resize-pane -L
bind-key -r -T prefix C-l resize-pane -R
# List of plugins
## first git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
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'
set -g @plugin 'junegunn/tmux-fzf-url'
set -g @continuum-restore 'on'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'