Skip to content

Instantly share code, notes, and snippets.

@leftwo
Last active March 17, 2020 20:59
Show Gist options
  • Save leftwo/e0f469e1ec5c88d2915e8fa72f4e07c7 to your computer and use it in GitHub Desktop.
Save leftwo/e0f469e1ec5c88d2915e8fa72f4e07c7 to your computer and use it in GitHub Desktop.
tmux config file
# 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 | split-window -h
bind - split-window -v
unbind '"'
unbind %
# Put status bar at the top
set-option -g status-position top
# Pick a unique color for each tmux host
set-option -g status-bg colour140
# More space for session name in status bar
set-option -g status-left-length 30
# Make escape key start scrollback mode
unbind [
bind Escape copy-mode
# More scrollback buffer
set-option -g history-limit 15000
# VI mode for scrollback
setw -g mode-keys vi
# Make space be "list of sessions"
# Move next-layout to R
unbind Space
bind -r R next-layout
bind Space choose-tree
# Make "n" and "p" next/previous session instead of window
unbind n
unbind p
bind -r n switch-client -n
bind -r p switch-client -p
# Reload config from .tmux.conf file
bind r source-file ~/.tmux.conf
# tmux plugins stuff
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-logging'
set -g @plugin 'tmux-plugins/tmux-resurrect'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment