-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.tmux.conf
115 lines (91 loc) · 3.7 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# set scroll history to 10,000 lines
set-option -g history-limit 10000
# use Ctrl Space for easier access
unbind -n C-b
unbind -n C-space
set -g prefix C-space
# C-space C-space to passthrough a C-space
unbind C-space
bind C-space send-key C-space
# set fish as the default Tmux shell
set-option -g default-shell /usr/local/bin/fish
# Use vi-mode for selection
setw -g mode-keys vi
# switch panes with vim navigation style keys
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Resize with ctrl vim navigation style keys
bind-key C-h resize-pane -L 5
bind-key C-j resize-pane -D 5
bind-key C-k resize-pane -U 5
bind-key C-l resize-pane -R 5
# Move window with uppercase vim navigation style keys
bind-key H swap-pane -s {right-of}
bind J swap-pane -D
bind K swap-pane -U
bind-key L swap-pane -s {left-of}
# Use [] to move left and right
bind [ previous-window
bind ] next-window
# new windows use home, splits use same path
bind v split-window -h -c "#{pane_current_path}"
bind s split-window -v -c "#{pane_current_path}"
# Use u for easier access to copy-mode (scrolling)
bind-key u copy-mode
# Alt-[1-9]: Switch to window
bind -n M-1 select-window -t :1
bind -n M-2 select-window -t :2
bind -n M-3 select-window -t :3
bind -n M-4 select-window -t :4
bind -n M-5 select-window -t :5
bind -n M-6 select-window -t :6
bind -n M-7 select-window -t :7
bind -n M-8 select-window -t :8
bind -n M-9 select-window -t :9
# Allow vi-like bindings in copy-mode as well
bind-key -T edit-mode-vi Up send-keys -X history-up
bind-key -T edit-mode-vi Down send-keys -X history-down
unbind-key -T copy-mode-vi Space ; bind-key -T copy-mode-vi v send-keys -X begin-selection
unbind-key -T copy-mode-vi Enter ; bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
unbind-key -T copy-mode-vi C-v ; bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
unbind-key -T copy-mode-vi [ ; bind-key -T copy-mode-vi [ send-keys -X begin-selection
unbind-key -T copy-mode-vi ] ; bind-key -T copy-mode-vi ] send-keys -X copy-selection
# Start windows and panes at 1, not 0
set -g base-index 1
setw -g pane-base-index 1
# Make the window index gapless (i.e. re-index when deleting a window)
set-option -g renumber-windows on
# put the status bar at the top instead
set-option -g status-position top
# update the status bar every second
set-option -g status-interval 1
# command delay? We don't want that, make it short
set -sg escape-time 1
# allows reloading the config inside of tmux
bind r source-file ~/.tmux.conf
# change the default color of the text in the inactive pane
set -g window-style 'fg=colour247'
set -g window-active-style 'fg=colour231'
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-sidebar'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'Morantron/tmux-fingers'
set -g default-terminal "xterm-256color"
set -g @continuum-boot-options 'iterm'
set -g @continuum-restore 'on'
# config for fingers, using nocompact mode as default
set -g @fingers-key C-f
set -g @fingers-compact-hints 0
set -g @fingers-hint-format-nocompact "#[fg=magenta,bold] [%s]"
set -g @fingers-highlight-format-nocompact "#[fg=cyan,bold,dim]%s"
# Source the generated tmuxlines.conf file. The file path must be absolute
if-shell "test -f ~/.config/private/tmuxline.conf" "source ~/.config/private/tmuxline.conf"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.local/share/tmux/plugins/tpm/tpm'