Mercurial > dotfiles.old
annotate tmux.conf @ 181:1ec3c51c9047
Add vim-like tmux copying
author | zegervdv <zegervdv@me.com> |
---|---|
date | Wed, 05 Nov 2014 21:55:16 +0100 |
parents | ca5ddc6081dc |
children | 925861e874ec |
rev | line source |
---|---|
9 | 1 # improve colors |
2 set -g default-terminal 'screen-256color' | |
7 | 3 |
162 | 4 source-file ~/.tmux/statusline.conf |
5 | |
7 | 6 bind s split-window -v |
7 bind v split-window -h | |
8 | |
9 | 9 # act like vim |
10 setw -g mode-keys vi | |
137 | 11 set -g status-keys vi |
140
e037d9b797eb
Fix colors and clipboad in vim and tmux
zegervdv <zegervdv@me.com>
parents:
137
diff
changeset
|
12 # bind-key -t vi-edit Up |
e037d9b797eb
Fix colors and clipboad in vim and tmux
zegervdv <zegervdv@me.com>
parents:
137
diff
changeset
|
13 # bind-key -t vi-eidt Down |
7 | 14 bind h select-pane -L |
15 bind j select-pane -D | |
16 bind k select-pane -U | |
17 bind l select-pane -R | |
9 | 18 bind-key -r C-h select-window -t :- |
19 bind-key -r C-l select-window -t :+ | |
20 | |
21 #act like GNU screen | |
22 unbind C-b | |
23 set -g prefix C-a | |
7 | 24 |
137 | 25 bind Escape copy-mode |
181 | 26 # Setup 'v' to begin selection as in Vim |
27 bind-key -t vi-copy v begin-selection | |
28 bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy" | |
7 | 29 # resize panes like vim |
30 # feel free to change the "1" to however many lines you want to resize by, only | |
31 # one at a time can be slow | |
32 bind < resize-pane -L 1 | |
33 bind > resize-pane -R 1 | |
34 bind - resize-pane -D 1 | |
35 bind + resize-pane -U 1 | |
36 | |
9 | 37 # start window numbers at 1 to match keyboard order with tmux window order |
38 set -g base-index 1 | |
7 | 39 |
9 | 40 # renumber windows sequentially after closing any of them |
41 set -g renumber-windows on | |
7 | 42 |
0 | 43 |
44 | |
9 | 45 # remove administrative debris (session name, hostname, time) in status bar |
162 | 46 # set -g status-left '' |
47 # set -g status-right '' | |
9 | 48 |
49 # increase scrollback lines | |
50 set -g history-limit 10000 | |
51 | |
52 # switch to last pane | |
53 bind-key C-a last-pane | |
54 | |
147 | 55 setw -g mode-mouse on |
56 | |
142 | 57 # Map window numbers |
58 # bind-key & select-window -t 1 | |
59 # bind-key é select-window -t 2 | |
60 # bind-key " select-window -t 3 | |
61 # bind-key ' select-window -t 4 | |
62 # bind-key ( select-window -t 5 | |
63 # bind-key § select-window -t 6 | |
64 # bind-key è select-window -t 7 | |
65 # bind-key ! select-window -t 8 | |
66 # bind-key ç select-window -t 9 | |
67 | |
9 | 68 # Local config |
69 if-shell "[ -f ~/.tmux.conf.local ]" 'source ~/.tmux.conf.local' | |
140
e037d9b797eb
Fix colors and clipboad in vim and tmux
zegervdv <zegervdv@me.com>
parents:
137
diff
changeset
|
70 # bind -t vi-copy 'v' begin-selection |
e037d9b797eb
Fix colors and clipboad in vim and tmux
zegervdv <zegervdv@me.com>
parents:
137
diff
changeset
|
71 # bind -t vi-copy 'y' copy-pipe "reattach-to-user-namespace pbcopy" |
e037d9b797eb
Fix colors and clipboad in vim and tmux
zegervdv <zegervdv@me.com>
parents:
137
diff
changeset
|
72 set-option -g default-command "reattach-to-user-namespace -l zsh" |
153 | 73 |
74 # Plugin Manager | |
75 set -g @tpm_plugins " \ | |
76 tmux-plugins/tpm \ | |
77 tmux-plugins/tmux-sensible \ | |
78 tmux-plugins/tmux-resurrect \ | |
79 " | |
80 run-shell ~/.tmux/plugins/tpm/tpm |