# HG changeset patch # User zegervdv # Date 1393710091 -3600 # Node ID aeb4af7c7fb66a011397275adc27dd7bd9892ca4 # Parent d20278638011d40be80b6744cc77b12ca19afdf0 update tmux conf diff -r d20278638011 -r aeb4af7c7fb6 tmux.conf --- a/tmux.conf Sat Mar 01 22:30:45 2014 +0100 +++ b/tmux.conf Sat Mar 01 22:41:31 2014 +0100 @@ -1,24 +1,21 @@ -# $Id: vim-keys.conf,v 1.2 2010-09-18 09:36:15 nicm Exp $ -# -# vim-keys.conf, v1.2 2010/09/12 -# -# By Daniel Thau. Public domain. -# -# This configuration file binds many vi- and vim-like bindings to the -# appropriate tmux key bindings. Note that for many key bindings there is no -# tmux analogue. This is intended for tmux 1.3, which handles pane selection -# differently from the previous versions +# improve colors +set -g default-terminal 'screen-256color' -# split windows like vim -# vim's definition of a horizontal/vertical split is reversed from tmux's bind s split-window -v bind v split-window -h -# move around panes with hjkl, as one would in vim after pressing ctrl-w +# act like vim +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-key -r C-h select-window -t :- +bind-key -r C-l select-window -t :+ + +#act like GNU screen +unbind C-b +set -g prefix C-a # resize panes like vim # feel free to change the "1" to however many lines you want to resize by, only @@ -28,19 +25,25 @@ bind - resize-pane -D 1 bind + resize-pane -U 1 -# bind : to command-prompt like vim -# this is the default in tmux already -bind : command-prompt +# start window numbers at 1 to match keyboard order with tmux window order +set -g base-index 1 -# vi-style controls for copy mode -setw -g mode-keys vi +# renumber windows sequentially after closing any of them +set -g renumber-windows on -set -g prefix C-a -unbind C-b -bind C-a send-prefix - -set -g default-terminal "screen-256color" +# remove administrative debris (session name, hostname, time) in status bar +set -g status-left '' +set -g status-right '' + +# increase scrollback lines +set -g history-limit 10000 + +# switch to last pane +bind-key C-a last-pane + +# Local config +if-shell "[ -f ~/.tmux.conf.local ]" 'source ~/.tmux.conf.local' bind -t vi-copy 'v' begin-selection bind -t vi-copy 'y' copy-pipe "reattach-to-user-namespace pbcopy"