Skip to content

Commit b5ffa01

Browse files
Update tmux.config
1 parent 510292a commit b5ffa01

File tree

1 file changed

+63
-10
lines changed

1 file changed

+63
-10
lines changed

Dotfiles/Mac/tmux.config

+63-10
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,78 @@
1-
### Change bind prefix
21
unbind C-b
3-
set -g prefix C-s
2+
set -g prefix C-k
3+
bind-key C-k send-prefix
44

5-
### set right colors
65
set -ga terminal-overrides ",screen-256color:Tc"
76

8-
## Resize panel
9-
### Fine adjustment (1 or 2 cursor cells per bump)
7+
unbind %
8+
bind | split-window -h
9+
unbind '"'
10+
bind - split-window -v
11+
12+
bind-key m resize-pane -Z
13+
14+
15+
# Coarse adjustment (5 or 10 cursor cells per bump)
16+
bind -n C-Left resize-pane -L 10
17+
bind -n C-Right resize-pane -R 10
18+
bind -n C-Down resize-pane -D 5
19+
bind -n C-Up resize-pane -U 5
20+
21+
bind c new-window -c "#{pane_current_path}"
22+
set -g base-index 1
23+
set -g renumber-windows on
24+
25+
# Fine adjustment (1 or 2 cursor cells per bump)
1026
bind -n S-Left resize-pane -L 2
1127
bind -n S-Right resize-pane -R 2
1228
bind -n S-Down resize-pane -D 1
1329
bind -n S-Up resize-pane -U 1
14-
bind-key f resize-pane -Z
1530

1631
# Coarse adjustment (5 or 10 cursor cells per bump)
1732
bind -n C-Left resize-pane -L 10
1833
bind -n C-Right resize-pane -R 10
1934
bind -n C-Down resize-pane -D 5
2035
bind -n C-Up resize-pane -U 5
2136

22-
### New windows
23-
bind c new-window -c "#{pane_current_path}"
24-
set -g base-index 1
25-
set -g renumber-windows on
37+
38+
# vim-like pane switching
39+
bind -r k select-pane -U
40+
bind -r j select-pane -D
41+
bind -r h select-pane -L
42+
bind -r l select-pane -R
43+
44+
45+
set -g mouse
46+
47+
bind r source-file ~/.tmux.conf \; display "Reloaded!"
48+
49+
# set-window-option -g mode-keys vi
50+
51+
bind-key -T copy-mode-vi 'v' send -X begin-selection # start selecting text with "v"
52+
bind-key -T copy-mode-vi 'y' send -X copy-selection # copy text with "y"
53+
54+
unbind -T copy-mode-vi MouseDragEnd1Pane # don't exit copy mode when dragging with mouse
55+
56+
# remove delay for exiting insert mode with ESC in Neovim
57+
set -sg escape-time 10
58+
# Resizing pane
59+
bind -r C-k resize-pane -U 5
60+
bind -r C-j resize-pane -D 5
61+
bind -r C-h resize-pane -L 5
62+
bind -r C-l resize-pane -R 5
63+
64+
65+
# list of tmux plugins
66+
#set -g @plugin 'christoomey/vim-tmux-navigator'
67+
set -g @plugin 'tmux-plugins/tmux-resurrect' # persist tmux sessions after computer restart
68+
set -g @plugin 'tmux-plugins/tmux-continuum' # automatically saves sessions for you every 15 minutes
69+
set -g @plugin 'fabioluciano/tmux-tokyo-night'
70+
71+
72+
set -g @resurrect-capture-pane-contents 'on'
73+
set -g @continuum-restore 'on'
74+
75+
76+
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
77+
run '~/.tmux/plugins/tpm/tpm'
78+

0 commit comments

Comments
 (0)