################ ### SETTINGS ### ################ set -g default-terminal "screen-256color" set -g terminal-overrides ",xterm-256color:RGB" set-option -g default-terminal "screen-256color" set -g prefix ^B set -g base-index 1 # start indexing windows at 1 instead of 0 set -g detach-on-destroy off # don't exit from tmux when closing a session set -g escape-time 0 # zero-out escape time delay set -g history-limit 1000000 # increase history size (from 2,000) set -g renumber-windows on # renumber all windows when any window is closed set -g set-clipboard on # use system clipboard set -g status-position top # macOS / darwin style set -g default-terminal "${TERM}" set -g pane-active-border-style "fg=magenta,bg=default" set -g pane-border-style "fg=brightblack,bg=default" set -g mouse on set -g allow-rename off set -g visual-activity off set -g visual-silence off set -g bell-action none # Reduce delay when pressing Escape in Vim set -sg escape-time 10 ####################### ### VI MODE COPYING ### ####################### setw -g mode-keys vi # Bind "v" to start selection (unchanged) bind-key -T copy-mode-vi v send -X begin-selection # Bind "y" to copy selection to system clipboard (xclip) bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel "xclip -in -selection clipboard" # Bind "Y" to copy entire visible buffer to system clipboard bind-key -T copy-mode-vi Y send -X copy-pipe-and-cancel "xclip -in -selection clipboard" # Bind "Enter" to copy selection (like "y") and exit copy mode bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard" # Optional: Bind "p" to paste from system clipboard into tmux bind-key p run-shell "xclip -out -selection clipboard | tmux load-buffer - && tmux paste-buffer" ############ ### LOAD ### ############ # Load plugins & plugin settings source-file ~/.config/tmux/tmux.plugins.conf # Load keybindings source-file ~/.config/tmux/tmux.keybindings.conf # Load local configuration if given if-shell "[ -f ~/.config/tmux/local.tmux.conf ]" "source-file ~/.config/tmux/local.tmux.conf" # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) # Install with git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm run ~/.config/tmux/plugins/tpm/tpm