Skip to content

Instantly share code, notes, and snippets.

@danstn
Last active May 28, 2024 12:50
Show Gist options
  • Save danstn/aaa242dfa0d4308ef5e4d367b7dc6cf1 to your computer and use it in GitHub Desktop.
Save danstn/aaa242dfa0d4308ef5e4d367b7dc6cf1 to your computer and use it in GitHub Desktop.
One file Tmux config
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# quick config reload
bind r source-file ~/.tmux.conf
# Enable mouse control (clickable windows, panes, resizable panes)
set -g mouse on
# act like vim
setw -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Start window numbers at 1 to match keyboard order with tmux window order
set -g base-index 1
set-window-option -g pane-base-index 1
# Automatically renumber windows
set -g renumber-windows on
# reload config file
bind r source-file ~/.tmux.conf
# mouse resizing
bind -n WheelUpPane \
if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" \
"if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment