-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtmux.conf
58 lines (46 loc) · 2 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
# https://github.com/square/maximum-awesome
# https://github.com/thoughtbot/dotfiles
set -g default-terminal "screen-256color"
# http://stackoverflow.com/questions/11832199/tmux-set-g-mouse-mode-on-doesnt-work
# set-option -g mouse on
# make scrolling with wheels work
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
set -g prefix C-a
unbind C-b
bind C-a send-prefix
set -g base-index 1
set-window-option -g pane-base-index 1
set -g renumber-windows on
# Easy config reload
bind-key R source-file ~/.tmux.conf \; display-message "tmux.conf reloaded."
setw -g mode-keys vi
# use vim-like keys for splits and windows
bind-key v split-window -h -c "#{pane_current_path}"
bind-key s split-window -v -c "#{pane_current_path}"
# Smart pane switching with awareness of vim splits
# https://github.com/christoomey/vim-tmux-navigator
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"'
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
# With this enabled you can use <prefix> C-l to clear the screen.
bind C-l send-keys 'C-l'
# Pane resizing
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# Maximize and restore a pane
unbind Up
bind Up new-window -d -n tmp \; swap-pane -s tmp.1 \; select-window -t tmp
unbind Down
bind Down last-window \; swap-pane -s tmp.1 \; kill-window -t tmp
# Status Bar solarized-dark (default)
set-window-option -g window-status-current-fg Cyan
set-option -g status-fg default
set-option -g status-bg black
set-option -g pane-active-border-fg black
set-option -g pane-border-fg black