-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
46 lines (35 loc) · 1.6 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
set -g default-terminal "screen-256color"
if-shell 'test "$(uname -s)" = Darwin' \
'set-option -g default-command "exec reattach-to-user-namespace -l zsh"' \
'set-option -g default-command "/bin/zsh"'
set-option -g history-limit 100000
# splits and new windows open in current directory.
bind '%' split-window -h -c '#{pane_current_path}' # Split panes horizontal
bind '"' split-window -v -c '#{pane_current_path}' # Split panes vertically
bind c new-window -c '#{pane_current_path}' # Create new window
# Switch panes with vim key bindings.
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
set-window-option -g mode-keys vi
# dont auto rename windows
set-option -g allow-rename off
# Send the same command to all panes/windows in current session
# Credit: https://scripter.co/command-to-every-pane-window-session-in-tmux/
bind E command-prompt -p "Command all:" \
"run \"tmux list-panes -s -F '##{session_name}:##{window_index}.##{pane_index}' \
| xargs -I PANE tmux send-keys -t PANE '%1' Enter\""
# List of plugins
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'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
# plugin settings
# tmux-plugins/tmux-prefix-highlight enable...
set -g status-right '#{prefix_highlight} | %a %Y-%m-%d %H:%M'
# tmux-plugins/tmux-continuum enable restore...
set -g @continuum-restore 'on'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'