Mercurial > dotfiles.old
comparison tmux.conf @ 7:4f1add3c7606
Make tmux act like vim
author | zegervdv <zegervdv@me.com> |
---|---|
date | Sun, 23 Feb 2014 18:32:49 +0100 |
parents | 36a9b3a28861 |
children | aeb4af7c7fb6 |
comparison
equal
deleted
inserted
replaced
6:d35280c9b023 | 7:4f1add3c7606 |
---|---|
1 # $Id: vim-keys.conf,v 1.2 2010-09-18 09:36:15 nicm Exp $ | |
2 # | |
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 | |
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 | |
15 bind v split-window -h | |
16 | |
17 # move around panes with hjkl, as one would in vim after pressing ctrl-w | |
18 bind h select-pane -L | |
19 bind j select-pane -D | |
20 bind k select-pane -U | |
21 bind l select-pane -R | |
22 | |
23 # resize panes like vim | |
24 # feel free to change the "1" to however many lines you want to resize by, only | |
25 # one at a time can be slow | |
26 bind < resize-pane -L 1 | |
27 bind > resize-pane -R 1 | |
28 bind - resize-pane -D 1 | |
29 bind + resize-pane -U 1 | |
30 | |
31 # bind : to command-prompt like vim | |
32 # this is the default in tmux already | |
33 bind : command-prompt | |
34 | |
35 # vi-style controls for copy mode | |
36 setw -g mode-keys vi | |
37 | |
1 set -g prefix C-a | 38 set -g prefix C-a |
2 unbind C-b | 39 unbind C-b |
3 bind C-a send-prefix | 40 bind C-a send-prefix |
4 | 41 |
42 set -g default-terminal "screen-256color" | |
5 | 43 |
6 set -g default-terminal "screen-256color" | |
7 set-option -g status-left '' | |
8 set-option -g status-right " #[bg=cyan] %d %b %Y %H:%M " | |
9 | |
10 set -g mode-mouse on | |
11 set -g mouse-select-pane on | |
12 set -g mouse-select-window on | |
13 set -g terminal-overrides 'xterm*:smcup@:rmcup@' | |
14 | |
15 setw -g mode-keys vi | |
16 | 44 |
17 bind -t vi-copy 'v' begin-selection | 45 bind -t vi-copy 'v' begin-selection |
18 bind -t vi-copy 'y' copy-pipe "reattach-to-user-namespace pbcopy" | 46 bind -t vi-copy 'y' copy-pipe "reattach-to-user-namespace pbcopy" |