-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
82 lines (62 loc) · 2.59 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
# Enable true color support.
set-option -g default-terminal "tmux-256color"
## Support RGB color by setting to value of $TERM outside of tmux.
set-option -a terminal-features 'xterm-256color:RGB'
# Enable focus-events to let LazyVim know when a terminal window is in focus.
set-option -g focus-events on
# Make it easier to jump to specific windows.
set -g base-index 1
setw -g pane-base-index 1
set -g renumber-windows on
# Remap prefix key to F12 (map F12 to Caps Lock in Windows).
unbind C-b
set -g prefix F12
# Enable vi key bindings in copy mode.
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle \; send -X begin-selection
# Use current pane path when creating and splitting windows.
bind a split-window -h -c "#{pane_current_path}"
bind A split-window -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# Enable prefix key double tap to maximize current pane.
bind F12 resize-pane -Z
# Use J to enter copy mode.
bind j copy-mode
# Use R to reload tmux configuration.
bind R source-file ~/.tmux.conf \; display-message "Config reloaded..."
# Increase scrollback.
set-option -g history-limit 10000
# Highlight current window.
set -g window-status-current-style bg=black,fg=white
# Align the window list to the center.
set-option -g status-justify centre
# Set window name to current directory name.
set-option -g status-interval 1
set-option -g automatic-rename on
set-option -g automatic-rename-format '#{b:pane_current_path}'
# Indicate in left side of the status line when prefix key has been pressed.
set -g status-left '#{?client_prefix,#[reverse] #S #[noreverse], #S }'
set-option -g status-left-length 20
# Show nothing in the right side of the status bar.
set -g status-right ''
set-option -g status-right-length 0
# Grab pane from target window and join to current window.
bind y command-prompt -p "join pane from:" "join-pane -s '%%'"
# Break pane to separate window.
bind u break-pane
# Toggle synchronize-panes, which sends CMDs to all panes in a window.
bind S \
set synchronize-panes \;\
display "Sync #{?synchronize-panes,ON,OFF}"
# Set layout of current window's panes to horizontal/vertical.
bind h select-layout even-horizontal
bind v select-layout even-vertical
# Re-run the last command in the next tmux pane.
bind k send-keys -t + "!!" C-m
# List of tpm plugins.
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
# Initialize Tmux Plugin Manager. Keep this line at the bottom of tmux.conf.
run '~/.tmux/plugins/tpm/tpm'