comparison tmux.conf @ 9:aeb4af7c7fb6

update tmux conf
author zegervdv <zegervdv@me.com>
date Sat, 01 Mar 2014 22:41:31 +0100
parents 4f1add3c7606
children f062b25a262e
comparison
equal deleted inserted replaced
8:d20278638011 9:aeb4af7c7fb6
1 # $Id: vim-keys.conf,v 1.2 2010-09-18 09:36:15 nicm Exp $ 1 # improve colors
2 # 2 set -g default-terminal 'screen-256color'
3 # vim-keys.conf, v1.2 2010/09/12
4 #
5 # By Daniel Thau. Public domain.
6 #
7 # This configuration file binds many vi- and vim-like bindings to the
8 # appropriate tmux key bindings. Note that for many key bindings there is no
9 # tmux analogue. This is intended for tmux 1.3, which handles pane selection
10 # differently from the previous versions
11 3
12 # split windows like vim
13 # vim's definition of a horizontal/vertical split is reversed from tmux's
14 bind s split-window -v 4 bind s split-window -v
15 bind v split-window -h 5 bind v split-window -h
16 6
17 # move around panes with hjkl, as one would in vim after pressing ctrl-w 7 # act like vim
8 setw -g mode-keys vi
18 bind h select-pane -L 9 bind h select-pane -L
19 bind j select-pane -D 10 bind j select-pane -D
20 bind k select-pane -U 11 bind k select-pane -U
21 bind l select-pane -R 12 bind l select-pane -R
13 bind-key -r C-h select-window -t :-
14 bind-key -r C-l select-window -t :+
15
16 #act like GNU screen
17 unbind C-b
18 set -g prefix C-a
22 19
23 # resize panes like vim 20 # resize panes like vim
24 # feel free to change the "1" to however many lines you want to resize by, only 21 # feel free to change the "1" to however many lines you want to resize by, only
25 # one at a time can be slow 22 # one at a time can be slow
26 bind < resize-pane -L 1 23 bind < resize-pane -L 1
27 bind > resize-pane -R 1 24 bind > resize-pane -R 1
28 bind - resize-pane -D 1 25 bind - resize-pane -D 1
29 bind + resize-pane -U 1 26 bind + resize-pane -U 1
30 27
31 # bind : to command-prompt like vim 28 # start window numbers at 1 to match keyboard order with tmux window order
32 # this is the default in tmux already 29 set -g base-index 1
33 bind : command-prompt
34 30
35 # vi-style controls for copy mode 31 # renumber windows sequentially after closing any of them
36 setw -g mode-keys vi 32 set -g renumber-windows on
37
38 set -g prefix C-a
39 unbind C-b
40 bind C-a send-prefix
41
42 set -g default-terminal "screen-256color"
43 33
44 34
35
36 # remove administrative debris (session name, hostname, time) in status bar
37 set -g status-left ''
38 set -g status-right ''
39
40 # increase scrollback lines
41 set -g history-limit 10000
42
43 # switch to last pane
44 bind-key C-a last-pane
45
46 # Local config
47 if-shell "[ -f ~/.tmux.conf.local ]" 'source ~/.tmux.conf.local'
45 bind -t vi-copy 'v' begin-selection 48 bind -t vi-copy 'v' begin-selection
46 bind -t vi-copy 'y' copy-pipe "reattach-to-user-namespace pbcopy" 49 bind -t vi-copy 'y' copy-pipe "reattach-to-user-namespace pbcopy"