-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.tmux.conf
83 lines (53 loc) · 2.46 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
# References
# - https://github.com/gpakosz/.tmux/blob/master/.tmux.conf
# - https://github.com/gpakosz/.tmux/blob/master/.tmux.conf.local
# -- general -------------------------------------------------------------------
set -g default-terminal "screen-256color"
set -s escape-time 0
# -- binds ---------------------------------------------------------------------
bind r source-file ~/.tmux.conf \; display '~/.tmux.conf sourced'
bind R run-shell "tmux rename-session $(basename #{pane_current_path})"
# -- display -------------------------------------------------------------------
set -g base-index 1
setw -g pane-base-index 1
setw -g automatic-rename off
# -- navigation ----------------------------------------------------------------
# create session
bind C-c new-session
# split current window horizontally
bind '"' split-window -v -c "#{pane_current_path}"
# split current window vertically
bind % split-window -h -c "#{pane_current_path}"
# pane navigation
bind -r h select-pane -L # move left
bind -r j select-pane -D # move down
bind -r k select-pane -U # move up
bind -r l select-pane -R # move right
bind > swap-pane -D # swap current pane with the next one
bind < swap-pane -U # swap current pane with the previous one
# pane resizing
bind -r H resize-pane -L 2
bind -r J resize-pane -D 2
bind -r K resize-pane -U 2
bind -r L resize-pane -R 2
# -- copy mode -----------------------------------------------------------------
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# -- user customizations -------------------------------------------------------
# increase history size
set -g history-limit 10000
# force Vi mode
# really you should export VISUAL or EDITOR environment variable, see manual
set -g status-keys vi
set -g mode-keys vi
# replace C-b by C-t
set -g prefix ^T
# Synchronization
bind e setw synchronize-panes on\; display-message "synchronize-panes on!"
bind E setw synchronize-panes off\; display-message "synchronize-panes off!"
# ----- powerline --------------------------------------------------------------
# @see https://powerline.readthedocs.io/en/master/usage/other.html#tmux-statusline
run-shell "powerline-daemon -q"
source "${POWERLINE_REPOSITORY_ROOT}/powerline/bindings/tmux/powerline.conf"
# -- user defined overrides ----------------------------------------------------
if '[ -f ~/.local/.tmux.conf ]' 'source ~/.local/.tmux.conf'