-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
60 lines (47 loc) · 2.4 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
# Copy-paste integration got this from: https://evertpot.com/osx-tmux-vim-copy-paste-clipboard/
set-option -g default-command "reattach-to-user-namespace -l zsh"
# set-option -g default-shell $SHELL
# Need to find out what the default path is now as I get an error about it
# set-option -g default-path $HOME/Development
set-option -g default-terminal 'screen-256color'
set-option -g prefix C-a
unbind-key l #Use CTRL+a to go to last-window, not l
bind-key C-a last-window
# So older versions could use vi-copy, but below is the new way
# Found this at: https://github.com/tmux/tmux/issues/754#issuecomment-297452143
bind-key -T edit-mode-vi Up send-keys -X history-up
bind-key -T edit-mode-vi Down send-keys -X history-down
unbind-key -T copy-mode-vi Space ; bind-key -T copy-mode-vi v send-keys -X begin-selection
unbind-key -T copy-mode-vi Enter ; bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
unbind-key -T copy-mode-vi C-v ; bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
unbind-key -T copy-mode-vi [ ; bind-key -T copy-mode-vi [ send-keys -X begin-selection
bind ] run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer"
# Update default binding of 'Enter' to also use copy-pipe
#unbind -t vi-copy Enter
#bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
# Bind ']' to use pbpaste
#bind ] run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer"
#Change bindings to be home row like vim for panes.
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
unbind %
bind-key | split-window -h
bind-key - split-window -v
bind-key _ split-window -v
#Set current window to red.
set -g window-status-current-style bg=red
#Set status on right to be green.
set -g status-right "#[fg=black]#H"
#Set status left options
set-option -g status-left '#[bg=black,fg=green][#[bg=black,fg=cyan]#S#[fg=green]]'
set-option -g status-left-length 100
set -g history-limit 99999
# Rather than constraining window size to the maximum size of any client
# connected to the *session*, constrain window size to the maximum size of any
# client connected to *that window*. Much more reasonable.
setw -g aggressive-resize on
# Dont auto rename windows
setw -g automatic-rename off
bind R source-file ~/.tmux.conf \; display-message "Config reloaded..."