After many years of using screen I recently started getting familiar with tmux. This is my current .tmux.conf:

# Remap prefix to screens, easier to type, same as "screen"
set -g prefix C-a
bind C-a send-prefix
unbind C-b

# Split panes
bind | split-window -h -c "#{pane_current_path}"
bind _ split-window -v -c "#{pane_current_path}"
unbind %    # split-window -h
unbind '"'  # split-window

# Rename session and window
bind r command-prompt -I "#{window_name}" "rename-window '%%'"
bind R command-prompt -I "#{session_name}" "rename-session '%%'"
unbind "\$" # rename-session
unbind ,    # rename-window

# Quality of life stuff
set -g history-limit 20000
set -g allow-rename off

# Start index of window/pane with 1, because we're humans, not computers
set -g base-index 1
setw -g pane-base-index 1

# Enable mouse support
set -g mouse on

## Join Windows
bind-key j command-prompt -p "join pane from:"   "join-pane -s '%%'"
bind-key s command-prompt -p "send pane to:"   "join-pane -t '%%'"

# Search mode vi (default is emac)
set-window-option -g mode-keys vi

# Install the tmux-logging plugin via the tmux plugin manager
# To save the whole terminal session of that screen to a file, issue: prefix + Alt + Shift + p 
set -g @plugin 'tmux-plugins/tmux-logging'

# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
# To install a plugin (and keep it installed) add a line like: set -g @plugin '...'
# Then while in tmux session do: prefix + I
# To update plugin(s) do: prefix + u
# To uninstall a plugin, remove its line from this file and do: prefix + Alt + u
run '~/.tmux/plugins/tpm/tpm'
My current tmux config
Tagged on:                 

Leave a Reply

Your email address will not be published. Required fields are marked *