Skip to content

Instantly share code, notes, and snippets.

@lleixat
Last active October 29, 2018 08:04
Show Gist options
  • Save lleixat/ce21f70f427af839e833220e83dcf51e to your computer and use it in GitHub Desktop.
Save lleixat/ce21f70f427af839e833220e83dcf51e to your computer and use it in GitHub Desktop.
Global tmux config
set -g default-terminal "screen-256color"
set-option -g default-shell /usr/bin/zsh
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# split panes using | and -
bind v split-window -h
bind s split-window -v
unbind '"'
unbind %
# 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
# Enable mouse control (clickable windows, panes, resizable panes)
set -g mouse-select-window on
set -g mouse-select-pane on
set -g mouse-resize-pane on
setw -g mode-mouse on
# don't rename windows automatically
set-option -g allow-rename off
# Allow xterm titles in terminal window, terminal scrolling with scrollbar, and setting overrides of C-Up, C-Down, C-Left, C-Right
#set -g terminal-overrides "xterm*:XT:smcup@:rmcup@:kUP5=\eOA:kDN5=\eOB:kLFT5=\eOD:kRIT5=\eOC"
# Scroll History
set -g history-limit 30000
# Set ability to capture on start and restore on exit window data when running an application
setw -g alternate-screen on
# Lower escape timing from 500ms to 50ms for quicker response to scroll-buffer access.
set -s escape-time 50
set -g status-bg colour244
set -g default-terminal "xterm-256color"
set-window-option -g xterm-keys on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment