You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
2.1 KiB
Plaintext

# Defaults, rest will be set with tmux-sensible
set -g default-terminal "tmux"
set -g default-shell $SHELL
11 years ago
set -g prefix C-a
set -g base-index 1
setw -g pane-base-index 1
set-option -as terminal-overrides ",xterm*:RGB"
# Copy & Paste with clipper -- see https://github.com/wincent/clipper
# starting copy & paste with Ctrl+a [
bind-key -T copy-mode-vi 'v' send-keys -X begin-selection
bind-key -T copy-mode-vi 'y' send-keys -X copy-pipe-and-cancel "nc localhost 8377"
bind-key -T copy-mode-vi Escape send -X cancel
10 years ago
# Saner window splitting / new windows
bind-key '\' split-window -h -c "#{pane_current_path}"
10 years ago
bind-key - split-window -v -c "#{pane_current_path}"
bind-key c new-window -c "#{pane_current_path}"
11 years ago
# Mouse support
set -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
bind -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
# Vim/nvim integration fixes
setw -g xterm-keys on
setw -g mode-keys vi
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"'
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind -n 'C-\' if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
11 years ago
# Plugin configuration
set -g @resurrect-processes 'O l nnn v m nvim g neomutt'
set -g @resurrect-strategy-vim 'session'
set -g @resurrect-strategy-nvim 'session'
set -g @continuum-boot 'on'
set -g @continuum-restore 'on'
3 years ago
set -g @continuum-boot-options 'iterm'
# Plugins loading and tmux plugin manager initialization
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 'schasse/tmux-jump'
set -g @plugin 'lawabidingcactus/tmux-gruvbox-truecolor'
run '~/.tmux/plugins/tpm/tpm'