# general unbind C-b unbind C-q unbind C-s set -g prefix 'C-s' bind 'C-s' send-prefix -2 set -sg escape-time 0 set -g default-terminal "xterm-256color" bind r source-file ~/.tmux.conf \; display '~/.tmux.conf sourced' set -g mouse on set-option -g allow-rename off # vim mode set-window-option -g mode-keys vi # navigation bind f command-prompt -p find-session: 'switch-client -t %%' bind v split-window -h -c '#{pane_current_path}' bind s split-window -v -c '#{pane_current_path}' unbind '"' unbind % ## swtich between pane bind h select-pane -L bind j select-pane -D bind k select-pane -U bind l select-pane -R ## resize the pane bind < resize-pane -L 5 bind > resize-pane -R 5 bind - resize-pane -D 5 bind + resize-pane -U 5 # copy and paste like vim bind -T copy-mode-vi 'v' send -X begin-selection bind -T copy-mode-vi 'y' send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy" if-shell 'test -f "$HOME/.local/.tmux.conf"' 'source ~/.local/.tmux.conf' bind C-j command-prompt -p "join pane from: " "join-pane -h -s '%%'" # move pane to the far right/left/bottom/top bind H splitw -fhb \; swapp -t ! \; killp -t ! bind L splitw -fh \; swapp -t ! \; killp -t ! bind J splitw -fv \; swapp -t ! \; killp -t ! bind K splitw -fvb \; swapp -t ! \; killp -t ! # Plugins set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-sensible' set -g @plugin 'tmux-plugins/tmux-sessionist' set -g @plugin 'tmux-plugins/tmux-resurrect' set -g @plugin 'tmux-plugins/tmux-continuum' set -g @continuum-restore 'on' run '~/.tmux/plugins/tpm/tpm'