Skip to content

Instantly share code, notes, and snippets.

@sdebnath
Created August 31, 2025 10:41
Show Gist options
  • Save sdebnath/5b601d6d63d31187f1ac228167a1014d to your computer and use it in GitHub Desktop.
Save sdebnath/5b601d6d63d31187f1ac228167a1014d to your computer and use it in GitHub Desktop.
tmux.conf
set-option -sa terminal-overrides ",xterm*:Tc"
set -g mouse on
unbind C-b
set -g prefix C-t
bind C-t send-prefix
# Start windows and panes at 1, not 0
set -g base-index 1
set -g pane-base-index 1
set-window-option -g pane-base-index 1
set-option -g renumber-windows on
# Use Alt-arrow keys without prefix key to switch panes
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Shift arrow to switch windows
bind -n S-Left previous-window
bind -n S-Right next-window
# set vi-mode
set-window-option -g mode-keys vi
# keybindings
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
bind '"' split-window -v -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment