# Keybinding Summary #======================================================== # Rename Session -> $ # Rename Tab -> , # Next/prev tab -> n/p # H-split/V-split -> s/v # Resize Pane -> leave alt -> h,j,k,l (repeat press) # Switch Pane -> # Enter copy mode -> [ # Exit copy mode -> # Reload tmux.conf -> r # More at: https://tmuxcheatsheet.com # TODO: Figure out how to save multiple sessions and resurrect them later #======================================================== # KEY BINDINGS #======================================================== # Change Tmux leader key to -> unbind C-b set -g prefix M-a bind-key M-a send-prefix # Kill current session with q bind q confirm-before kill-session # Intuitive split bindings to | & - unbind % bind s split-window -h unbind '"' bind v split-window -v # Open panes in the current directory bind - split-window -v -c "#{pane_current_path}" bind | split-window -h -c "#{pane_current_path}" # Use repeated(h,j,k,l)s to resize current pane bind -r h resize-pane -L bind -r l resize-pane -R bind -r k resize-pane -U bind -r j resize-pane -D # Use Vim Navigations to copy text from the NON-vim panes # Enable Tmux copy mode with [ -> Then use Vim navigations bind-key -T copy-mode-vi "v" send -X begin-selection bind-key -T copy-mode-vi "y" send -X copy-selection unbind -T copy-mode-vi MouseDragEnd1Pane # Enable mouse selection as well # From Tmux-sensible Plugin bind C-p previous-window bind C-n next-window bind C-a send-prefix bind a last-window bind r source-file ~/.config/tmux/tmux.conf \; display-message "Tmux config reloaded." # Change resurrect keys to (Save) & (Resurrect) set -g @resurrect-save "M-s" set -g @resurrect-restore "M-r" #======================================================== # OPTIONS #======================================================== set -g set-clipboard on # Use system clipboard setw -g mode-keys vi set-window-option -g mode-keys vi # From tmux-sensible plugin set -g display-time 1000 # Display message for 1s set -g history-limit 50000 # Increase scrollback buffer set -g mouse on # Mouse mode set -s escape-time 0 # Address Vim switching delay set -g status-interval 5 # Refresh status every 5s (default 15s) set -g focus-events on # Enable focus event setw -g aggressive-resize on # For grouped sessions # Resurrection Options set -g @resurrect-capture-pane-contents "on" set -g @resurrect-strategy-nvim "session" set -g @resurrect-dir "$HOME/.config/tmux/resurrect" # Don't exit tmux when closing a session set -g detach-on-destroy off #======================================================== # APPEARANCE #======================================================== # Start window numbers at 1 to match keyboard order with tmux window order set -g base-index 1 set -g pane-base-index 1 set -g renumber-windows on set-window-option -g pane-base-index 1 # Improve colors set -g default-terminal "${TERM}" set-option -g default-terminal "xterm-256color" set-option -sa terminal-overrides ",xterm*:Tc" # Status at top set -g status-position top #======================================================== # PLUGINS #======================================================== run "~/.config/tmux/plugins/tpm/tpm" # Init Tmux Plugin Manager # TODO: Get into Tmux copy stuff when required set -g @plugin "christoomey/vim-tmux-navigator" # sync pane nav with Vim window nav set -g @plugin "tmux-plugins/tmux-resurrect" # Persist sessions set -g @plugin "tmux-plugins/tmux-continuum" # Auto save sessions every 15mins set -g @plugin 'tmux-plugins/tmux-yank' set -g @plugin "tmux-plugins/tmux-copycat" set -g @plugin "catppuccin/tmux" #======================================================== # PLUGINS Configurations #======================================================== # Color schemes set -g @catppuccin_flavour "mocha" set -g @catppuccin_window_left_separator "" set -g @catppuccin_window_right_separator " " set -g @catppuccin_window_middle_separator " █" set -g @catppuccin_status_left_separator " " set -g @catppuccin_status_right_separator " " set -g @catppuccin_status_right_separator_inverse "no" set -g @catppuccin_status_fill "icon" set -g @catppuccin_window_current_text "#W" set -g @catppuccin_window_current_fill "number" set -g @catppuccin_window_default_text "#W" set -g @catppuccin_window_default_fill "number" set -g @catppuccin_window_status_enable "yes" set -g @catppuccin_window_status_icon_enable "yes" set -g @catppuccin_window_number_position "right" set -g @catppuccin_status_connect_separator "no" set -g @catppuccin_directory_text "#{pane_current_path}" set -g @catppuccin_status_modules_right "session directory" set -g @plugin "tmux-plugins/tpm"