-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
79 lines (60 loc) · 2.06 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
# Set scroll history to 100,000 lines
set-option -g history-limit 100000
# Modern colors
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",alacritty:Tc"
# Unbind the prefix and bind it to Ctrl-s (not ^a since that is main tmux)
unbind C-b
set -g prefix C-s
bind C-s send-prefix
# Reload config manually
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
# Avoid ESC delay
set -s escape-time 0
# Fix titlebar
set -g set-titles on
set -g set-titles-string "#T"
# VIM mode
set -g mode-keys vi
# Move between panes with vi keys
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Splitting windows ('\' should be escaped)
bind-key - split-window -v -c '#{pane_current_path}'
bind-key \\ split-window -h -c '#{pane_current_path}'
# Resizing panes
# Fine adjustment (1 or 2 cursor cells per bump)
bind -n S-Left resize-pane -L 2
bind -n S-Right resize-pane -R 2
bind -n S-Down resize-pane -D 1
bind -n S-Up resize-pane -U 1
# Resizing panes
# Coarse adjustment (5 or 10 cursor cells per bump)
bind -n C-Left resize-pane -L 10
bind -n C-Right resize-pane -R 10
bind -n C-Down resize-pane -D 5
bind -n C-Up resize-pane -U 5
# Create window
bind c new-window -c "#{pane_current_path}"
# Start window numbering at 1
set -g base-index 1
# Renumber windows as they are created and destroyed to keep the window numbers consistent with the count
set -g renumber-windows on
# Close window
bind Q killw
# Close pane
bind q killp
bind -r [ previous-window
bind -r ] next-window
bind -r Tab last-window # cycle thru MRU tabs
# Trigger copy mode by (M - is Alt key)
bind -n M-Up copy-mode
# Scroll up/down by 1 line, half screen, whole screen
bind -T copy-mode-vi M-Up send-keys -X scroll-up
bind -T copy-mode-vi M-Down send-keys -X scroll-down
bind -T copy-mode-vi M-PageUp send-keys -X halfpage-up
bind -T copy-mode-vi M-PageDown send-keys -X halfpage-down
bind -T copy-mode-vi PageDown send-keys -X page-down
bind -T copy-mode-vi PageUp send-keys -X page-up