Skip to content

Instantly share code, notes, and snippets.

@ChristosT
Created July 31, 2017 03:52
Show Gist options
  • Select an option

  • Save ChristosT/e3095632f33b5e4a724e10320a7000d9 to your computer and use it in GitHub Desktop.

Select an option

Save ChristosT/e3095632f33b5e4a724e10320a7000d9 to your computer and use it in GitHub Desktop.
Sample tmux config file
# replace prefix with ctrl a
unbind-key C-b
set-option -g prefix C-a
bind-key C-a send-prefix
#set vi-type bindings
setw -g mode-keys vi
# increase history
set-option -g history-limit 6000
# utf8 is on
#set -g utf8 on
#set -g status-utf8 on
# address vim mode switching delay (http://superuser.com/a/252717/65504)
set -s escape-time 0
# tmux messages are displayed for 4 seconds
set -g display-time 4000
# refresh 'status-left' and 'status-right' more often
set -g status-interval 5
# highligth main pane
set-option -g pane-active-border-fg blue
# upgrade $TERM
#set -g default-terminal "screen-256color"
#set -g default-terminal "xterm-256color"
#set -g default-terminal "xterm"
# focus events enabled for terminals that support them
#set -g focus-events on
# super useful when using "grouped sessions" and multi-monitor setup
#setw -g aggressive-resize on
#resize with ease ala-vim
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# Navigate panes like Vim.
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# use | and - to split the windows
bind-key | split-window -h
bind-key - split-window -v
# kill window with no confirmation
unbind &
bind-key & kill-window
#previous window
bind m previous-window
#Remap copy paste
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
bind -t vi-copy 'v' begin-selection
bind -t vi-copy 'y' copy-selection
#Copy buffer to system's clipboard
#bind C-c run "tmux save-buffer - | xclip -i -sel clipboard"
#bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"
# make current more visible !!
set-option pane-border-fg green
set-option pane-border-bg black
set-option pane-active-border-fg white
set-option pane-active-border-bg cyan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment