-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
131 lines (100 loc) · 3.89 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# set -g prefix C-a
# unbind C-b
# the bind -r means that the key may repeat, see th repeat time option man tmux
set -sg escape-time 1
set -g base-index 1
setw -g pane-base-index 1
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# remap prefix from C-b to C-a
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
bind | split-window -h
bind - split-window -v
bind h select-pane -L
bind l select-pane -R
bind j select-pane -D
bind k select-pane -U
bind -r n next-window
bind -r N previous-window # because we are using p for paste-buffer
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
bind -r H resize-pane -L 5
bind -r L resize-pane -R 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 14
bind [ swap-window -t -1
bind ] swap-window -t +1 # if you bind ] then you can't enter copy mode, you enter copy mode via <esc>
# bind -r o select-pane -t :.+ # next pane repeated
unbind Space
bind -r Space select-pane -t :.+ # next pane repeated
unbind o
bind -r o select-pane -t :.+ # next pane repeated
# Go to pane x - this overwrites the default which is <prefix>1 means select-window 1
# bind 1 select-pane -t 1
# bind 2 select-pane -t 2
# bind 3 select-pane -t 3
# bind 4 select-pane -t 4
# bind 5 select-pane -t 5
# Instead <prefix><shift-1> means select-window 1, commenting out to use the default <prefix>1 -> select-window 1
# bind ! select-window -t :1
# bind @ select-window -t :2
# bind '#' select-window -t :3
# bind $ select-window -t :4
# bind C-1 select-window -t :1 # do not work because Control-1 , etc have special meanings for the terminal emulator
# bind C-2 select-window -t :2
# bind C-3 select-window -t :3
# bind C-4 select-window -t :4
# bind C-5 select-window -t :5
setw -g mouse on
set -g default-terminal "screen-256color"
set -g status-fg white
set -g status-bg black
setw -g window-status-style bg=default,fg=cyan,dim
setw -g window-status-current-style fg=white,bg=red,bright
set -g pane-border-status top
set -g pane-border-style fg=green,bg=black
set -g pane-active-border-style fg=green,bg=grey
set -g message-style fg=white,bg=black,bright
set -g status-left-length 40
set -g status-left "#[fg=green]Session: #S #[fg=yellow]#I #[fg=cyan]#P"
set -g status-right "#[fg=cyan]%d %b %R"
setw -g monitor-activity on
set -g visual-activity on
setw -g mode-keys vi
#no automatic renaming
setw -g automatic-rename off
set -g allow-rename off
# https://github.com/tmux/tmux/wiki/FAQ#what-is-the-passthrough-escape-sequence-and-how-do-i-use-it
set -g allow-passthrough on
unbind [
bind Escape copy-mode # copy mode
unbind p
bind p paste-buffer
# vi-copy removed from tmux https://github.com/tmux/tmux/commit/76d6d3641f271be1756e41494960d96714e7ee58
# bind -t vi-copy 'v' begin-selection
# bind -t vi-copy 'y' copy-selection
# Enter copy-mode with <prefix> Esc, start selection with <space> then press y to copy to clipboard
# bind -t vi-copy y copy-pipe 'xclip -in -selection clipboard' # make sure that xclip is installed
#maximizing panes
# unbind Up
# bind Up new-window -d -n tmp \; swap-pane -s tmp.1 \; select-window -t tmp
# bind Down last-window \; swap-pane -s tmp.1 \; kill-window -t tmp
#
# use [ and ] to move the windows
bind -r [ swap-window -t -1
bind -r ] swap-window -t +1
#bind-key : last-window
# <prefix>; : go to last (previously used) pane (this is the default binding in tmux)
# List of tmux plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
source-file -q ~/.tmux.conf.extra
# Initialize TMUX plugin manager (keep this ine at the very bottom of tmux.conf)
# For this to work you need to install TPM with
# git clone https://github.com/tmux-plugins/tmp ~/.tmux/plugins/tpm
# you have a bash function called tpminstall that does that
# After loading tmux use <prefix>I to install the plugins and <prefix>r to reload the config
run '~/.tmux/plugins/tpm/tpm'
# Press <prefix> I for install the plugins