Skip to content

Instantly share code, notes, and snippets.

@thorrr
Created March 3, 2024 14:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thorrr/12c753e88bef77f29bf793eceef52aee to your computer and use it in GitHub Desktop.
Save thorrr/12c753e88bef77f29bf793eceef52aee to your computer and use it in GitHub Desktop.
tmux.conf - change leader key to `
# Change prefix key to backtick (`)
unbind C-b
set-option -g prefix `
bind ` send-prefix
# history size - number of lines
set -g history-limit 100000
####################################
# make scroll/"copy" mode friendlier
####################################
# trigger copy mode by
bind -n M-Up copy-mode
# Scroll up/down by 1 line, half screen, whole screen
bind -T copy-mode-vi M-Up send-keys -X scroll-up
bind -T copy-mode-vi M-Down send-keys -X scroll-down
bind -T copy-mode-vi M-PageUp send-keys -X halfpage-up
bind -T copy-mode-vi M-PageDown send-keys -X halfpage-down
bind -T copy-mode-vi PageDown send-keys -X page-down
bind -T copy-mode-vi PageUp send-keys -X page-up
###############
# mouse tweaks
###############
set -g mouse on
#####################################
# change window split / move bindings
#####################################
# split panes using | and -
bind | split-window -h
bind - split-window -v
bind 0 kill-pane
unbind '"'
unbind %
# automatically resize the session when the window resizes
set-window-option -g aggressive-resize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment