-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
68 lines (53 loc) · 1.69 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
# Install tpm if not installed
if "test ! -d ~/.tmux/plugins/tpm"; then
run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'
fi
# Plugins list
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'
# Mouse mode
set -g mouse on
# Status bar config
set -g status on
set -g status-left "[#S]"
set -g status-right "[%H%M]"
set -g status-justify centre
# Vim-style pane selection
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Vim-style pane resize
bind -r H resize-pane -L 1
bind -r J resize-pane -D 1
bind -r K resize-pane -U 1
bind -r L resize-pane -R 1
# Vim-style navigtion
setw -g mode-keys vi
# Vim-style normal/visual mode
bind Escape copy-mode
bind-key -T copy-mode-vi 'v' send-keys -X begin-selection
bind-key -T copy-mode-vi 'y' send-keys -X copy-pipe-and-cancel
# Open windows/panes in current directory
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# Pop-up windows
bind-key Q display-popup
bind-key N display-popup -E 'vim'
# Show Current Pane Path
bind-key P display-message "#{pane_current_path}"
# Saving pane content
bind-key S capture-pane -b temp-capture-buffer -S - \; \
save-buffer -b temp-capture-buffer ~/tmux.log \; \
delete-buffer -b capture-buffer
# Index windows from one
set -g base-index 1
# Disable pane rename
set-option -g allow-rename off
# Set escape time
set-option -sg escape-time 10
# Initialize tpm (keep at bottom)
run '~/.tmux/plugins/tpm/tpm'