Mercurial > dotfiles.old
annotate tmux.conf @ 230:73cc022a8bef
Add hybrid colorscheme
author | zegervdv <zegervdv@me.com> |
---|---|
date | Thu, 22 Jan 2015 21:55:12 +0100 |
parents | 1d9bec72b9b3 |
children | 367fd20ecfbc |
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 | |
218 | 31 bind-key C-a send-prefix |
7 | 32 |
137 | 33 bind Escape copy-mode |
181 | 34 # Setup 'v' to begin selection as in Vim |
35 bind-key -t vi-copy v begin-selection | |
36 bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy" | |
7 | 37 # resize panes like vim |
38 # feel free to change the "1" to however many lines you want to resize by, only | |
39 # one at a time can be slow | |
40 bind < resize-pane -L 1 | |
41 bind > resize-pane -R 1 | |
42 bind - resize-pane -D 1 | |
43 bind + resize-pane -U 1 | |
44 | |
9 | 45 # start window numbers at 1 to match keyboard order with tmux window order |
46 set -g base-index 1 | |
7 | 47 |
9 | 48 # renumber windows sequentially after closing any of them |
49 set -g renumber-windows on | |
7 | 50 |
193 | 51 bind-key r source ~/.tmux.conf |
52 | |
208 | 53 # Fix hightlighting in less |
54 set -ga terminal-overrides ',*:sitm@,ritm@' | |
0 | 55 |
9 | 56 # remove administrative debris (session name, hostname, time) in status bar |
162 | 57 # set -g status-left '' |
58 # set -g status-right '' | |
9 | 59 |
60 # increase scrollback lines | |
61 set -g history-limit 10000 | |
62 | |
147 | 63 setw -g mode-mouse on |
64 | |
142 | 65 # Map window numbers |
66 # bind-key & select-window -t 1 | |
67 # bind-key é select-window -t 2 | |
68 # bind-key " select-window -t 3 | |
69 # bind-key ' select-window -t 4 | |
70 # bind-key ( select-window -t 5 | |
71 # bind-key § select-window -t 6 | |
72 # bind-key è select-window -t 7 | |
73 # bind-key ! select-window -t 8 | |
74 # bind-key ç select-window -t 9 | |
75 | |
191 | 76 |
9 | 77 # Local config |
78 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
|
79 # bind -t vi-copy 'v' begin-selection |
e037d9b797eb
Fix colors and clipboad in vim and tmux
zegervdv <zegervdv@me.com>
parents:
137
diff
changeset
|
80 # 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
|
81 set-option -g default-command "reattach-to-user-namespace -l zsh" |
153 | 82 |
83 # Plugin Manager | |
198 | 84 set -g @tpm_plugins " \ |
85 tmux-plugins/tpm \ | |
86 tmux-plugins/tmux-resurrect \ | |
87 tmux-plugins/tmux-open \ | |
88 tmux-plugins/tmux-copycat \ | |
153 | 89 " |
90 run-shell ~/.tmux/plugins/tpm/tpm |