-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
189 lines (178 loc) · 6.38 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
# https://superuser.com/questions/401926/how-to-get-shiftarrows-and-ctrlarrows-working-in-vim-in-tmux
set-window-option -g xterm-keys on
# http://phansch.net/2014/03/10/using-tmux-and-tmuxinator/
#
# Renumber windows sequentially after closing any of them.
# Otherwise if you close the second tab of three, you end
# up with tabs numbered 1 and 3.
set -g renumber-windows on
# set window and pane index to 1 (0 by default)
set-option -g base-index 1
setw -g pane-base-index 1
# Allows for faster key repetition
set -s escape-time 0
# # act like GNU screen
unbind C-b
set -g prefix C-a
# Allow C-A a to send C-A to application
bind C-a send-prefix
# split panes using | and -
bind | split-window -hd
bind - split-window -vd
unbind '"'
unbind %
# ad config file (change file location to your the tmux.conf you want to use)
bind r source-file ~/.tmux.conf
# vim-tmux-resizer
# https://github.com/melonmanchan/vim-tmux-resizer
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?x?)(diff)?$"'
bind -n M-h if-shell "$is_vim" "send-keys M-h" "resize-pane -L 10"
bind -n M-l if-shell "$is_vim" "send-keys M-l" "resize-pane -R 10"
bind -n M-k if-shell "$is_vim" "send-keys M-k" "resize-pane -U 5"
bind -n M-j if-shell "$is_vim" "send-keys M-j" "resize-pane -D 5"
# split window mantener mismo directorio
bind \\ split-window -hd
bind - split-window -vd
# bind \\ "split-window -h -d -c '#{pane_current_path}'" # Split panes horizontal
# bind - "split-window -v -d -c '#{pane_current_path}'" # Split panes vertically
#
# # start window index of 1
# set -g base-index 1
#
# # UTF-8 charater support in the status bar
# set-option -g status-utf8 on
#
# # Lowers the delay time between the prefix key and other keys - fixes pausing in vim
# https://github.com/microsoft/WSL/issues/5931
set -sg escape-time 50
#
# # Uncomment these if you'd like to use the mouse
# set-window-option -g mode-mouse on
# set-option -g mouse-select-pane on
# set-option -g mouse-resize-pane on
# set-option -g mouse-select-window on
#
# # When in Copy mode, act like vim
# set-window-option -g mode-keys vi
#
#
# ### Keybidings
# bind h select-pane -L
# bind j select-pane -D
# bind k select-pane -U
# bind l select-pane -R
# bind-key -r C-h select-window -t :-
# bind-key -r C-l select-window -t :+
# bind-key C-a last-window
# bind-key e select-window -t editor
# bind-key v select-window -t vim
# bind-key | split-window -h
# bind-key \ split-window -h
# bind-key - split-window -v
# bind-key _ split-window -v -p 25 # Makes a horizontal 'testing' pane
# bind-key / split-window -h -p 33 # Makes a vertical 'testing' pane
# bind-key T join-pane -ht vim -p 33 # Makes the current pane merge horizontally with a 'vim' window at 33%
# bind-key V join-pane -ht vim -p 33 # Makes the current pane merge horizontally with a 'vim' window at 33%
# bind-key b break-pane -d
# bind-key x kill-pane
# bind-key X kill-window
# bind-key q confirm-before kill-session
# bind-key Q confirm-before kill-server
# bind-key , previous-window # <
# bind-key . next-window # >
# bind-key -r < swap-window -t :-
# bind-key -r > swap-window -t :+
# bind-key n command-prompt 'rename-window %%'
# bind-key N command-prompt 'rename-session %%'
# bind-key Escape copy-mode -u
# bind-key Up copy-mode -u
# bind-key r source-file ~/.tmux.conf; display-message " ✱ ~/.tmux.conf is reloaded"
# bind-key R refresh-client
# bind-key a send-key C-a
# bind-key S set-option status
# bind-key J resize-pane -D 5
# bind-key K resize-pane -U 5
# bind-key H resize-pane -L 5
# bind-key L resize-pane -R 5
# bind-key M-j resize-pane -D
# bind-key M-k resize-pane -U
# bind-key M-h resize-pane -L
# bind-key M-l resize-pane -R
#
# # Copy mode keybindings
# unbind p
# bind p paste-buffer
# bind -t vi-copy 'v' begin-selection
# bind -t vi-copy 'y' copy-selection
#
#
#
# # # look good
set -g default-terminal "screen-256color"
set-option -ga terminal-overrides ",*256col*:Tc"
# #set TERM=screen-256color
#
# set -g history-limit 5000
#
#
# # # Set window notifications
# setw -g monitor-activity on
# set -g visual-activity on
#
#
# # set status bar
# # ---------------------------------------------------------
#
# ## default statusbar colors
# set-option -g status-utf8 on
# set-option -g status-bg colour11
# set-option -g status-fg colour8
#
# ## highlight active window
# set-window-option -g window-status-current-bg colour166
# set-window-option -g window-status-current-fg colour15
# set-window-option -g window-status-current-attr bold
# set-window-option -g window-status-current-format ' #I #W '
#
#
# #set-option -g status-left '⣿'
# #set-option -g status-right '⡇ #[bold]❐ #S:#I#[default] ⡇ #[bold]#(whoami) ● #H#[default] '
# #set-option -g status-right '⡇ ❐ #S ⡇ ❖ #(rvm tools identifier) ⡇ #(whoami) ● #H '
# set-option -g status-left '⣿ #[bold]#[fg=red]❖ #(rvm tools identifier)#[fg=colour8] ❐ #S#[default] ⡇'
# set-option -g status-right '#[bold]#(whoami) ● #H#[default] %Y-%m-%d %H:%M ⡇ #(~/battery Discharging)'
#
# set-option -g status-right-length 60
# set-option -g status-left-length 60
#
# ## set window notifications
# set-option -g visual-activity on
# set-option -g visual-content on
# set-window-option -g monitor-activity on
# set-window-option -g automatic-rename off
#
# ## tmux window titling for X
# set-option -g set-titles on
# set-option -g set-titles-string '[#I] #W'
# set-window-option -g automatic-rename on
# set-window-option -g window-status-format ' #I #W '
# set-window-option -g window-status-attr bold
# # starts windows at 1 not 0
# set-option -g base-index 1
#
# # set-window-option -g monitor-activity off
# # set-window-option -g monitor-content off
# # set-option -g status-keys vi
# # set-option -g history-limit 4096
#
# ## pane border and colors
# set-option -g pane-active-border-fg yellow
# set-option -g pane-border-fg white
#
# # Time messages remain in the status bar. Lower this number
# # if this is too distracting.
# set-option -g display-time 3000
#
# # ---------------------------------------------------------
#
# # Sane scrolling (not sure what it does...)
# # set -g terminal-overrides 'xterm*:smcup@:rmcup@'