-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
67 lines (51 loc) · 1.82 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
# fix for random escape sequence appearing when entering fish
set -g escape-time 50
# 256 colour nonsense
set -g default-terminal xterm-256color
set -ga terminal-overrides ",*256col*:Tc"
set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
set-environment -g COLORTERM "truecolor"
# lanuch fish inside tmux
set -g default-command /opt/homebrew/bin/fish
set -g default-shell /opt/homebrew/bin/fish
# use vi keybindings in copy mode
setw -g mode-keys vi
# setup 'v' to begin selection as in vim
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel pbcopy
# new pane opens in current directory
bind c new-window -c "#{pane_current_path}"
# split panes using '|' and '-'
# --- not needed with tmux-pain-control
#bind | split-window -h -c "#{pane_current_path}"
#bind - split-window -v -c "#{pane_current_path}"
unbind '"'
unbind %
set -g pane-border-format "#{pane_index} #{pane_current_command}"
# reload config file
bind r source-file ~/.tmux.conf
# switch panes using Alt-arrow without prefix
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# enable mouse mode
set -g mouse on
#set -g focus-events on
# --- not needed with tmux-sensible
# styling
set -g pane-active-border-style fg=colour208,bg=default
# TPM plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tomhey/tmux-remote-sessions'
# for vim
set -g @resurrect-strategy-vim 'session'
# for neovim
set -g @resurrect-strategy-nvim 'session'
# Load in Tmuxline snapshot
source-file "~/.config/tmux/tmuxlinerc"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run "~/.tmux/plugins/tpm/tpm"