-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
74 lines (64 loc) · 2.14 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
#
# TMUX Config
#
# General settings
set -g default-terminal 'xterm-256color'
set -g escape-time 0
set -g mouse on
set -g renumber-windows on
set -g base-index 1
set -g display-time 3000
set -g status-left ''
set -g status-right '#{prefix_highlight} #(tmuxkubecfg) %a %Y-%m-%d %H:%M '
set -g status-right-length 100
set -g status-bg colour24
set -g status-fg colour250
set -g status-interval 1
set -g window-status-format ' #I:#{b:pane_current_path} '
set -g window-status-current-format '#[bg=colour29]#[fg=colour255] #I:#{b:pane_current_path} '
set -g @scroll-without-changing-pane 'on'
set -g @scroll-in-moused-over-pane 'off'
set -g @scroll-speed-num-lines-per-scroll '1'
set -g @emulate-scroll-for-no-mouse-alternate-buffer 'on'
set -g @prefix_highlight_show_copy_mode 'on'
set -g @prefix_highlight_prefix_prompt 'Wait'
set -g @prefix_highlight_copy_prompt 'Copy'
setw -g aggressive-resize on
# Change tmux prefix
unbind C-b
set -g prefix C-Space
# Vim style keybindings in copy mode
setw -g mode-keys vi
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy" # remove pbcopy on linux
# Reload tmux config
unbind r
bind r source-file ~/.tmux.conf \; display 'Reloaded tmux config.'
# Rebind command key to semicolon
unbind \;
bind \; command-prompt
# window/pane bindings
unbind C; bind C new-window -a -c "#{pane_current_path}"
unbind c; bind c new-window
unbind C-n; bind C-n next-window
unbind C-p; bind C-p previous-window
unbind [; bind [ swap-window -d -t -1
unbind ]; bind ] swap-window -d -t +1
unbind q; bind q kill-pane
unbind s; bind s split-window -h -c "#{pane_current_path}"
# Move around panes with vim style movement keys
bind -r h select-pane -L
bind -r j select-pane -D
bind -r k select-pane -U
bind -r l select-pane -R
# Copy mode
unbind v
bind v copy-mode
# Plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'nhdaly/tmux-better-mouse-mode'
set -g @plugin 'tmux-plugins/tmux-resurrect'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'