Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
.tmux.conf
setw -g mode-keys vi
set-option -g default-command "reattach-to-user-namespace -l zsh"
bind y run-shell "reattach-to-user-namespace -l zsh -c 'tmux show-buffer | pbcopy'"
unbind C-b
set -g prefix C-a
bind-key a send-prefix
# Add a binding to toggle status line
bind v set status
# Display tmux session name in the tab title
set-option -g set-titles on
set-option -g set-titles-string "#S:#{pane_current_command}"
# Eliminate ESC key delay
set -sg escape-time 0
# Activity monitoring
# setw -g monitor-activity on
# set -g visual-activity off
# Disable status line by default
# set -g status off
# Enable mouse pane switching
set-option -g mouse-select-pane on
# Toggle mouse scrolling
setw -g mode-mouse on
# Set up proper terminal with 256 colors
set -g default-terminal "screen-256color"
# Highlight active window
set-window-option -g window-status-current-bg yellow
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
# hjkl pane traversal
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Make semicolon behave like colon
bind-key \; command-prompt
# Clear pane
bind k send-keys -R
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment