Mercurial > dotfiles.old
annotate tmux.conf @ 196:1665f80ff713
Cleanup
author | zegervdv <zegervdv@me.com> |
---|---|
date | Sat, 15 Nov 2014 09:29:15 +0100 |
parents | 0c8211e1c67a |
children | cd732b11bbcd |
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 |
189
925861e874ec
Add vim-tmux-navigator for seamless navigation
zegervdv <zegervdv@me.com>
parents:
181
diff
changeset
|
14 # bind h select-pane -L |
925861e874ec
Add vim-tmux-navigator for seamless navigation
zegervdv <zegervdv@me.com>
parents:
181
diff
changeset
|
15 # bind j select-pane -D |
925861e874ec
Add vim-tmux-navigator for seamless navigation
zegervdv <zegervdv@me.com>
parents:
181
diff
changeset
|
16 # bind k select-pane -U |
925861e874ec
Add vim-tmux-navigator for seamless navigation
zegervdv <zegervdv@me.com>
parents:
181
diff
changeset
|
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 | |
189
925861e874ec
Add vim-tmux-navigator for seamless navigation
zegervdv <zegervdv@me.com>
parents:
181
diff
changeset
|
21 # Move between tmux and vim seamlessly |
925861e874ec
Add vim-tmux-navigator for seamless navigation
zegervdv <zegervdv@me.com>
parents:
181
diff
changeset
|
22 bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L" |
925861e874ec
Add vim-tmux-navigator for seamless navigation
zegervdv <zegervdv@me.com>
parents:
181
diff
changeset
|
23 bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D" |
925861e874ec
Add vim-tmux-navigator for seamless navigation
zegervdv <zegervdv@me.com>
parents:
181
diff
changeset
|
24 bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U" |
925861e874ec
Add vim-tmux-navigator for seamless navigation
zegervdv <zegervdv@me.com>
parents:
181
diff
changeset
|
25 bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R" |
925861e874ec
Add vim-tmux-navigator for seamless navigation
zegervdv <zegervdv@me.com>
parents:
181
diff
changeset
|
26 bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys 'C-\\') || tmux select-pane -l" |
925861e874ec
Add vim-tmux-navigator for seamless navigation
zegervdv <zegervdv@me.com>
parents:
181
diff
changeset
|
27 |
9 | 28 #act like GNU screen |
29 unbind C-b | |
30 set -g prefix C-a | |
7 | 31 |
137 | 32 bind Escape copy-mode |
181 | 33 # Setup 'v' to begin selection as in Vim |
34 bind-key -t vi-copy v begin-selection | |
35 bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy" | |
7 | 36 # resize panes like vim |
37 # feel free to change the "1" to however many lines you want to resize by, only | |
38 # one at a time can be slow | |
39 bind < resize-pane -L 1 | |
40 bind > resize-pane -R 1 | |
41 bind - resize-pane -D 1 | |
42 bind + resize-pane -U 1 | |
43 | |
9 | 44 # start window numbers at 1 to match keyboard order with tmux window order |
45 set -g base-index 1 | |
7 | 46 |
9 | 47 # renumber windows sequentially after closing any of them |
48 set -g renumber-windows on | |
7 | 49 |
193 | 50 bind-key r source ~/.tmux.conf |
51 | |
0 | 52 |
53 | |
9 | 54 # remove administrative debris (session name, hostname, time) in status bar |
162 | 55 # set -g status-left '' |
56 # set -g status-right '' | |
9 | 57 |
58 # increase scrollback lines | |
59 set -g history-limit 10000 | |
60 | |
61 # switch to last pane | |
62 bind-key C-a last-pane | |
63 | |
147 | 64 setw -g mode-mouse on |
65 | |
142 | 66 # Map window numbers |
67 # bind-key & select-window -t 1 | |
68 # bind-key é select-window -t 2 | |
69 # bind-key " select-window -t 3 | |
70 # bind-key ' select-window -t 4 | |
71 # bind-key ( select-window -t 5 | |
72 # bind-key § select-window -t 6 | |
73 # bind-key è select-window -t 7 | |
74 # bind-key ! select-window -t 8 | |
75 # bind-key ç select-window -t 9 | |
76 | |
191 | 77 |
9 | 78 # Local config |
79 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
|
80 # bind -t vi-copy 'v' begin-selection |
e037d9b797eb
Fix colors and clipboad in vim and tmux
zegervdv <zegervdv@me.com>
parents:
137
diff
changeset
|
81 # 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
|
82 set-option -g default-command "reattach-to-user-namespace -l zsh" |
153 | 83 |
84 # Plugin Manager | |
85 set -g @tpm_plugins " \ | |
86 tmux-plugins/tpm \ | |
87 tmux-plugins/tmux-sensible \ | |
88 tmux-plugins/tmux-resurrect \ | |
89 " | |
90 run-shell ~/.tmux/plugins/tpm/tpm |