-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
60 lines (47 loc) · 2.08 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
# This File is : tmux.conf (aliased to ~/.tmux.conf)
# NOTE:
# Mac OSX specific configs go in ~/.tmux-conf/tmux-osx.conf
# PREFIX: set to ``Ctrl-Space`` instead of the default ``Ctrl-b``
# unbind C-b
# set -g prefix C-Space
# bind Space send-prefix
# KEYBINDINGS: enable vi keybindings
set -g mode-keys vi
# HISTORY: increase number of lines saved to history
set -g history-limit 50000
# SPLITS:
# -- use "|" and "-" to do vertical/horizontal splits;
# -- bind |, -, c to create (split-)windows with the current directory;
# -- bind C to create window with home directory.
unbind %
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
bind C new-window
# LAST-WINDOW
bind-key C-a last-window
# PANE MOVEMENTS:
# Smart pane switching with awareness of vim splits (requires
# vim-tmux-navigator plugin in order to work in vim)
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"
# use <prefix><C-l> for <C-l>, since is bound above
bind C-l send-keys 'C-l'
# Set the delay when pressing Esc to 0 (man tmux for more information)
set -s escape-time 0
# Range: 233 (darkest) ~ 239 (lightest)
# set-window-option -g window-style bg=colour235
# set-window-option -g window-active-style bg=colour233
#######################################################################
# Tmux Plugin Manager #
#######################################################################
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-logging'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux-conf/plugins/tpm/tpm'