-
Notifications
You must be signed in to change notification settings - Fork 5
/
_tmux.conf
59 lines (45 loc) · 2.35 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
# vim: set ft=tmux
# Many of these were borrowed from Pivotal's tmux.config
# https://github.com/pivotal/tmux-config
set-option -g default-command "reattach-to-user-namespace -l fish"
# Be like GNU Screen
set -g prefix C-a
unbind C-b
set -g default-terminal "screen-256color"
set-option -g default-shell /usr/local/bin/fish
setw -g mode-keys vi # Vim binding in copy mode
# Vim navigation between panes FTW
# Make sure the vim plugin is installed (https://github.com/christoomey/vim-tmux-navigator)
#bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim(diff)?$' && tmux send-keys C-h) || tmux select-pane -L"
#bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim(diff)?$' && tmux send-keys C-j) || tmux select-pane -D"
#bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim(diff)?$' && tmux send-keys C-k) || tmux select-pane -U"
#bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim(diff)?$' && tmux send-keys C-l) || tmux select-pane -R"
#bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim(diff)?$' && tmux send-keys 'C-\\') || tmux select-pane -l"
bind -n C-h select-pane -L
bind -n C-j select-pane -U
bind -n C-k select-pane -D
bind -n C-l select-pane -R
# Enable mouse support (works in iTerm)
set-option -g -q mouse on
# setup 'v' to begin selection as in vim
#bind -t vi-copy v begin-selection
#bind -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
# scrollback buffer size increase
set -g history-limit 500000
# Open splits and windows in same path we came from
# http://superuser.com/a/720820
bind-key c new-window -c "#{pane_current_path}"
bind-key % split-window -c "#{pane_current_path}"
bind-key '"' split-window -h -c "#{pane_current_path}"
bind-key d source ~/.config/tmux/dev-layout
# Theme
#set -g pane-border-fg black
#set -g pane-active-border-f magenta
set -g status-justify left
set -g status-bg black
set -g status-fg colour12
set -g status-interval 2
set -g status-right-length 150
set -g status-right '#[fg=black,bg=blue] #{=50:pane_title} #[fg=black,bg=cyan] %Y/%m/%d #[fg=black,bg=cyan] %H:%M '
setw -g window-status-format '#[fg=cyan,bg=black] #I #[fg=cyan,bg=black] #W '
setw -g window-status-current-format '#[fg=black,bg=cyan] #I #[fg=black,bg=magenta] #W '