Skip to content

Instantly share code, notes, and snippets.

@Goles
Created March 31, 2013 19:24
Show Gist options
  • Save Goles/5281688 to your computer and use it in GitHub Desktop.
Save Goles/5281688 to your computer and use it in GitHub Desktop.
My tmux conf
###
### Nicolas Goles tmux config file.
###
set-option -g default-command "reattach-to-user-namespace -l zsh"
set -g default-terminal "screen-256color"
set -g history-limit 20000
set-option -ga update-environment ' LANG'
set-option -ga update-environment ' LC_ALL'
# use VI
set-window-option -g mode-keys vi
# Use ctrl-d instead of ctrl-b
set -g prefix C-t
unbind C-t
bind C-t send-prefix
# reload config
unbind r
bind r source-file ~/.tmux.conf
unbind ^T
bind ^T split-window -p 25
# horizontal and vertical splits
unbind |
bind | split-window -h
unbind _
bind _ split-window
# tile all windows
unbind =
bind = select-layout tiled
# cycle through panes
unbind ^T
bind ^T select-pane -t :.+
unbind Right
bind Right resize-pane -R 8
unbind Left
bind Left resize-pane -L 8
unbind Up
bind Up resize-pane -U 4
unbind Down
bind Down resize-pane -D 4
unbind h
bind h select-pane -L
unbind j
bind j select-pane -D
unbind k
bind k select-pane -U
unbind l
bind l select-pane -R
# status bar
set-option -g status-utf8 on
set -g status-bg black
set -g status-fg white
set -g status-interval 1
set -g status-right-length 60
# to speed-up vim
#set-option -s escape-time 10
set -sg escape-time 0
set -g status-right "#(/usr/bin/battery -o tmux) %d/%m/%Y %H:%M"
set-window-option -g window-status-current-bg black
set-window-option -g window-status-current-fg black
#to copy
bind C-c run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
bind C-v run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment