-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
81 lines (61 loc) · 2.33 KB
/
.tmux.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# OSX - See /opt/local/share/doc/tmux-pasteboard/Usage.md
# and /opt/local/share/doc/tmux-pasteboard/README.md
# following doesn't work with locally compiled tmux. What does it do again?
#if-shell 'test "$(uname -s)" = Darwin' 'set-option -g default-command "exec reattach-to-user-namespace -l bash"'
# Remap prefix from 'C-b' to 'C-\'
unbind C-b
set-option -g prefix 'C-\'
# pressing `prefix + prefix` sends <prefix> to the shell
bind-key 'C-\' send-prefix
# set correct term
set -g default-terminal "screen-256color"
# address vim mode switching delay (http://superuser.com/a/252717/65504)
set-option -s escape-time 0
# emacs key bindings in tmux command prompt (prefix + :) are better than
# vi keys, even for vim users
set-option -g status-keys emacs
# focus events enabled for terminals that support them
# TODO: example usage
set-option -g focus-events on
# increase scrollback buffer size
set-option -g history-limit 50000
# tmux messages are displayed for 4 seconds
set-option -g display-time 4000
# refresh 'status-left' and 'status-right' more often
set-option -g status-interval 5
# Number tmux windows 1, 2, ...
set -g base-index 1
set -g pane-base-index 1
set-window-option -g pane-base-index 1
set-option -g renumber-windows on
# required (only) on OS X
# set-option -g default-command "reattach-to-user-namespace -l $SHELL"
# If Ctrl-a is prefix then `Ctrl-a + a` switches between alternate windows.
# Works for any prefix character.
# bind-key '\' last-window
# easier switching between next/prev window
bind-key C-p previous-window
bind-key C-n next-window
# Sain split bindings with \ and -
unbind '"'
unbind %
bind '\' split-window -h
bind '-' split-window -v
# Switch pains with meta-arrow
bind -n M-h select-pane -L
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
# Resize with meta--,=,,,.
bind -n M-, resize-pane -L 1
bind -n M-. resize-pane -R 1
bind -n M-= resize-pane -U 1
bind -n M-- resize-pane -D 1
# Enable mouse for selecting panes and passing events to terminal. (Slow)
# visual text selection (for cut-and-paste) will now require using Meta.
set-option -g mouse on
#bind -n WheelUpPane copy-mode
# See: http://floriancrouzat.net/2010/07/compile-and-run-tmux-with-mouse-support-in-mac-os-x-terminal-app/
# See: https://github.com/tmux/tmux
# http://libevent.org/
# http://invisible-island.net/ncurses/