-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
66 lines (49 loc) · 1.75 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
# ########################
# GENERAL SETTINGS
# ########################
# Set leader key to '`' for command prefix
set-option -g prefix '`'
# Enable mouse support for interacting with tmux
set -g mouse on
# Start window and pane indexes at 1 instead of 0 for easier access
set -g base-index 1
setw -g pane-base-index 1
# Set escape time to 0 for nvim to reduce delay
set -s escape-time 0
# Apply terminal overrides for nvim compatibility
set-option -sa terminal-overrides 'xterm-256color:RGB'
# Enable focus events for nvim
set-option -g focus-events on
# ########################
# NAVIGATION & RESIZING
# ########################
# Set pane movement keys with Leader + hjkl
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Set pane resizing keys with Leader + HJKL
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# ########################
# PANE APPEARANCE
# ########################
# Set active pane border color to green
setw -g pane-active-border-style fg=green
# Set inactive pane border color to red
setw -g pane-border-style fg=red
# ########################
# CLIPBOARD INTEGRATION
# ########################
# Copying text in the pane to clipboard using xclip or pbcopy on macOS
if-shell "command -v xclip" "bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel 'xclip -selection clipboard -i'"
if-shell "command -v pbcopy" "bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel 'pbcopy'"
# ########################
# CUSTOM COMMANDS
# ########################
# Reload tmux configuration with 'r'
bind r source-file ~/.tmux.conf \; display "tmux config reloaded"
# Rename tab with 'R'
bind R command-prompt -I "#W" "rename-window '%%'"