-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
43 lines (35 loc) · 1.48 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
## Use vim keybindings in copy mode
set-option -g mouse on
setw -g mode-keys vi
set-option -s set-clipboard off
bind P paste-buffer
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X rectangle-toggle
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel 'xclip -se c -i'
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel 'xclip -se c -i'
# Setting the proper terminal colors
set -g default-terminal "screen-256color"
set -g status-bg black
set -g status-fg white
# 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 'christoomey/vim-tmux-navigator'
# Restoring sessions
set -g @resurrect-strategy-vim 'session'
set -g @resurrect-strategy-nvim 'session'
# So Tmux can install plugins (has to do with where homebrew installs tmux to
set-environment -g PATH "/usr/local/bin:/bin:/usr/bin"
set-environment -g TMUX_PLUGIN_MANAGER_PATH '~/.tmux/plugins/'
# Have new splits/windows be initialized to current directory
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# Name Tmux sessions after the current path
set-option -g automatic-rename on
set-option -g automatic-rename-format '#{b:pane_current_path}'
# Tells tmux not to wait for escape characters
set -s escape-time 0
run '~/.tmux/plugins/tpm/tpm'