-
Notifications
You must be signed in to change notification settings - Fork 4
/
.tmux.conf
67 lines (60 loc) · 2.39 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
set-option -g default-terminal "screen-256color"
set-option -g default-shell $SHELL
set-option -g assume-paste-time 0
if '[ `uname` = Darwin ]' 'set -g default-command "reattach-to-user-namespace -l zsh"'
# Reduce escape-time for nvim
set-option -sg escape-time 10
# tmux 2.1+ mouse configuration
set -g mouse on
# Note to self regarding splits:
# Ctrl+a " - split pane horizontally.
# Ctrl+a % - split pane vertically.
# Ctrl+a arrow key - switch pane.
# Hold Ctrl+a, don't release it and hold one of the arrow keys - resize pane.
# Ctrl+a c - (c)reate a new window.
# Ctrl+a n - move to the (n)ext window.
# Ctrl+a p - move to the (p)revious window.
# Ctrl+a q - display pane number (and type number to focus that numbered pane)
# Ctrl+a z - display current pane in full-screen mode. Again to switch back.
# act like GNU screen by adding C-a as a second prefix (tmux 2.1+ syntax)
set -g prefix2 C-a
bind-key a send-keys C-a
bind-key b send-prefix
#bind C-a last-window
bind-key | splitw -v
bind-key - splitw -h
bind-key j command-prompt -p "join pane from:" "join-pane -s '%%'"
bind-key S command-prompt -p "send pane to:" "join-pane -t '%%'"
bind-key m command-prompt -p "move window to number:" "move-window -t '%%'"
bind-key s command-prompt -p "switch this window with number:" "swap-window -t '%%'"
bind-key r source-file ~/.tmux.conf \; display-message "tmux.conf reloaded."
bind-key h select-layout even-horizontal
bind-key v select-layout even-vertical
bind-key C-s setw synchronize-panes
# Copy mode
# setw -g mode-keys vi
# bind ` copy-mode
# unbind [
# unbind p
# bind p paste-buffer
# bind-key -T copy-mode-vi v begin-selection
# bind-key -T copy-mode-vi y copy-selection
# bind-key -T copy-mode-vi Escape cancel
bind y run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
#Source powerline for the default statusbar
run-shell "powerline-daemon -q"
source "$HOME/vim-config/.vim/bundle/powerline/powerline/bindings/tmux/powerline.conf"
#Apply some overrides to the defaults
set-option -g status-position top
#Start counting windows at 1 instead of 0, so the shortcuts for tabs match those of iTerm2
set -g base-index 1
set -g pane-base-index 1
# Activity monitoring
setw -g monitor-activity on
set -g visual-activity on
set -g pane-border-style fg=blue
set -g pane-active-border-style fg=magenta
# Show pane titles
set -g pane-border-status top
set-window-option -g automatic-rename on
set-option -g set-titles on