-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
83 lines (63 loc) · 1.92 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
83
##
## Plugins
##
set -g @plugin 'tmux-plugins/tpm' # tpm
set -g @plugin 'tmux-plugins/tmux-sensible' # basic configs
set -g @plugin 'catppuccin/tmux'
set -g @catppuccin_flavour 'macchiato'
# set -g @plugin 'tmux-plugins/tmux-resurrect'
# set -g @resurrect-dir '~/.tmux/resurrect'
# set -g @resurrect-strategy-vim 'session'
# set -g @plugin 'tmux-plugins/tmux-continuum'
# set -g @continuum-boot 'off'
# set -g @continuum-restore 'on'
set -g @plugin 'nhdaly/tmux-better-mouse-mode'
set -g @scroll-without-changing-pane "on"
set -g @emulate-scroll-for-no-mouse-alternate-buffer "on"
set -g @plugin 'tmux-plugins/tmux-yank' # better copying
##
## Key bindings and settings
##
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# enable mouse
set-option -g mouse on
# color
set -g default-terminal "xterm-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc"
# split panes using | and - (and split on cwd)
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
unbind '"'
unbind %
# open new window on pane cwd
bind c new-window -c "#{pane_current_path}"
# don't rename windows automatically
set-option -g allow-rename off
# increase repeat time to allow for holding down a key
set -g repeat-time 600
# eliminate esc delay
set -s escape-time 0
# Use zsh by default
set -g default-shell /bin/zsh
# use vim keys for copy mode
setw -g mode-keys vi
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
bind P paste-buffer
# easier movements between panes
bind -n C-h select-pane -L
bind -n C-l select-pane -R
bind -n C-k select-pane -U
bind -n C-j select-pane -D
# start windows and panes at 1, not 0
set -g base-index 1
set -g pane-base-index 1
set-window-option -g pane-base-index 1
set-option -g renumber-windows on
##
## Initialize TPM (keep at bottom)
##
run '~/.tmux/plugins/tpm/tpm'