Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
90 lines (70 sloc) 2.1 KB
# my settings
set -g base-index 1
set -g status-bg white
set -g status-fg black
set -sg escape-time 0
set -g default-terminal "screen-256color"
set -g xterm-keys on
set -g pane-border-fg white
set -g pane-active-border-fg cyan
set -g set-titles on
setw -g automatic-rename on
setw -g window-status-current-bg cyan
unbind C-b
set -g prefix C-Space
bind C-Space send-prefix
# Some nice binds
bind C command-prompt -p "Name of new window: " "new-window -n '%%'"
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."
bind C-l send-key -R \; clear-history \; send-key C-l
# history limit
set -g history-limit 10000
# vi key bindings
setw -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
#bind -t vi-copy v begin-selection
#bind -t vi-copy y copy-selection
#bind -t vi-copy V rectangle-toggle
#bind -t vi-copy Escape cancel
# vi like key bindings
bind -r < resize-pane -L 1
bind -r - resize-pane -D 1
bind -r + resize-pane -U 1
bind -r > resize-pane -R 1
# allow repeat in window changing
bind -r n next-window
bind -r b previous-window
bind -r q last-window
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# same directory
unbind c; bind c new-window -c "#{pane_current_path}"
# mousemode
if-shell "[[ `tmux -V` == *2.0 ]]" 'setw -g mode-mouse on; setw -g mouse-resize-pane on; setw -g mouse-select-pane on; setw -g mouse-select-window on' 'set -g mouse on'
# activity monitoring
setw -g monitor-activity on
set -g visual-activity on
# utf8
# setw -g utf8 on
# set -g status-utf8 on
# better resize
setw -g aggressive-resize on
# Renumber those windows
set -g renumber-windows on
# Put them on top
set -g status-position top
# Make it more like my vim binding
unbind w
bind w select-pane -t :.+
# clock
setw -g clock-mode-colour cyan
# faster repeat
set -s escape-time 0
set -g status-left '#[fg=blue] #S '
# edit backlog
bind e capture-pane -S - '\;' split-window -v "tmux show-buffer | sed '/^\s*$/d' | view - +'$' +'set clipboard=unnamed'; xclip -o -selection clipboard | tmux load-buffer -"