This repository has been archived by the owner on Apr 23, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
88 lines (65 loc) · 2.5 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
82
83
84
85
86
87
88
# Keys
unbind C-b
set-option -g prefix C-Space
bind C-Space send-prefix
## better pane splitting
# bind | split-window -h -c '#{pane_current_path}'
# bind - split-window -v -c '#{pane_current_path}'
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# Allow reloading the config
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# Turn on mouse
set -g mouse on
# Displaying Stuff
set -g status on
set -g status-left-length 10
set -g status-left ""
set -g status-right ""
set -g status-interval 60
set -g status-justify left
setw -g monitor-activity on
set -g visual-activity on
## visual stuff
set -g status-fg white
set -g status-bg black
setw -g window-status-fg white
setw -g window-status-bg default
setw -g window-status-attr dim
setw -g window-status-current-fg black
setw -g window-status-current-bg white
setw -g window-status-current-attr bright
set -g message-fg white
set -g message-bg black
set -g message-attr bright
## make delay minimal
## set escape-time 1
set -sg escape-time 0
# Turn on aggresive resizing
setw -g aggressive-resize on
## Set up copy and paster
## set-option -g default-command "reattach-to-user-namespace -l zsh"
## this will renumber windows automatically when one gets deleted
set-option -g renumber-windows on
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Look good
set -g default-terminal "xterm-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc"
## http://robots.thoughtbot.com/post/53022241323/seamlessly-navigate-vim-and-tmux-splits
## smart pane switching with awareness of vim splits
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys 'C-\\') || tmux select-pane -l"
# Space enters copy mode
bind Space copy-mode
# C-Space ? is awkward to press
bind / list-keys
# Copy mode works with the main clipboard
unbind -t vi-copy Enter
## bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
## bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"