Skip to content

Instantly share code, notes, and snippets.

@jarutis
Created November 6, 2021 22:39
Show Gist options
  • Save jarutis/bed22f003fc5b4cf3e03c901528d0618 to your computer and use it in GitHub Desktop.
Save jarutis/bed22f003fc5b4cf3e03c901528d0618 to your computer and use it in GitHub Desktop.
set -g default-terminal "xterm-256color"
set -ga terminal-overrides ",*256col*:Tc"
set -sg escape-time 0
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# reload config file (change file location to your the tmux.conf you want to use)
bind r source-file ~/.tmux.conf
# switch panes using Alt-arrow without prefix
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
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# vi mode
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment