-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
42 lines (36 loc) · 1.69 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
# Italics
# https://github.com/tmux/tmux/blob/310f0a960ca64fa3809545badc629c0c166c6cd2/FAQ#L355-L383
set -g default-terminal "tmux"
# Remap prefix
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# Status bar
set -g status-style bg=colour144,fg=colour0
set -g status-left-length 20
set -g status-right " %a %b %d %R "
set -g window-status-current-style bg=colour0,fg=colour7
set -g window-status-current-format " #I:#W "
set -g window-status-format " #I:#W "
# Vim integration
set -g mode-keys vi
set -g escape-time 50
bind -n C-h run "(tmux display-message -p '#{pane_title}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_title}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_title}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_title}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
# Sessions
bind C-j choose-tree
bind C-b send-keys 'tat && exit' 'C-m'
bind C-x confirm-before -p "kill-session #S? (y/n)" "run-shell 'tmux switch-client -n \\\; kill-session -t \"#S\" || tmux kill-session'"
# Windows & panes
set -g pane-active-border-style fg=colour67
bind c new-window -c "#{pane_current_path}"
bind _ split-window -v -c "#{pane_current_path}"
bind | split-window -h -c "#{pane_current_path}"
bind b break-pane -d
bind j command-prompt -p "join pane from: " "join-pane -h -s '%%'"
bind s display-panes\; command-prompt -p "swap pane #: " "swap-pane -t '%%'"
# Misc
bind r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
bind t split-window -h -c ~/ "vim ~/vimwiki/src/vimwiki/task.*"