Skip to content

Instantly share code, notes, and snippets.

@MateusTymoniuk
Last active February 27, 2025 20:49
Show Gist options
  • Select an option

  • Save MateusTymoniuk/b427ff07895704d47c670d497079ddae to your computer and use it in GitHub Desktop.

Select an option

Save MateusTymoniuk/b427ff07895704d47c670d497079ddae to your computer and use it in GitHub Desktop.
Useful configurations for tmux
set -g default-terminal "tmux-255color"
set -s escape-time 0
set -g base-index 1
# use mouse scrolling
set -g mouse on
set-option -g prefix C-a
unbind C-b
bind-key C-a send-prefix
bind r source-file ~/.tmux.conf
set-window-option -g mode-keys vi
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
# vim-like pane switching
bind -r ^ last-window
bind -r k select-pane -U
bind -r j select-pane -D
bind -r h select-pane -L
bind -r l select-pane -R
# Set new panes to open in current directory
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind-key -r f run-shell "tmux neww ~/.local/scripts/tmux-sessionizer"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment