-
Notifications
You must be signed in to change notification settings - Fork 4
/
tmux.conf
58 lines (45 loc) · 1.61 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
# :: TPM - Tmux plugin manager
if "test ! -d ~/.tmux/plugins/tpm" \
"run 'mkdir -p ~/.tmux/plugins && git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"
# List of plugins
set -g @tpm_plugins ' \
caiogondim/maglev \
tmux-plugins/tpm \
tmux-plugins/tmux-sensible \
tmux-plugins/tmux-resurrect \
tmux-plugins/tmux-continuum \
tmux-plugins/tmux-yank \
tmux-plugins/tmux-pain-control \
tmux-plugins/tmux-copycat \
tmux-plugins/tmux-open \
tmux-plugins/tmux-battery \
tmux-plugins/tmux-cpu \
christoomey/vim-tmux-navigator \
'
# Initialize plugin manager
run '~/.tmux/plugins/tpm/tpm'
# Count windows from 1
set -g base-index 1
set -g pane-base-index 1
# Remove ESC delay
set -sg escape-time 0
# Enable mouse
set -g mouse on
# Change prefix
set -g prefix C-a
unbind C-b
# Reload config
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# Horizontal and vertical splits
bind \ split-window -v -c "#{pane_current_path}"
bind | split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# Move tmux status line on top
set-option -g status-position top
set-option -g repeat-time 0
# Copy paste integration on macOS
if-shell 'test "$(uname -s)" = Darwin' 'set-option -g default-command "exec reattach-to-user-namespace -l zsh"'
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Bind ']' to use pbpaste
bind ] run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer"