-
Notifications
You must be signed in to change notification settings - Fork 4
/
tmux.conf
84 lines (68 loc) · 2.45 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
# rm mouse mode fail
set -g mouse on
set -g focus-events on
# set-option -ga terminal-overrides ",xterm-256color:Tc"
# set -sa terminal-overrides ',xterm*:Tc:sitm=\E[4m:colors=256'
set -g default-terminal "tmux-256color"
set-option -ga terminal-overrides ",${TERM}:Tc"
# C-b is not acceptable -- Vim uses it
set-option -g prefix C-a
unbind C-b
bind C-a send-prefix
# Start numbering at 1
set-option -g base-index 1
setw -g pane-base-index 1
# shorten command delay
set -s escape-time 10
# use PREFIX | to split window horizontally and PREFIX - to split vertically
bind | split-window -h -c '#{pane_current_path}'
bind - split-window -v -c '#{pane_current_path}'
# map Vi movement keys as pane movement keys
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# resize panes using PREFIX H, J, K, L
bind H resize-pane -L 5
bind J resize-pane -D 5
bind K resize-pane -U 5
bind L resize-pane -R 5
# reload config
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."
bind u send-keys C-l \; run-shell "sleep .3s" \; clear-history
# ---------------------
# Copy & Paste
# ---------------------
# provide access to the clipboard for pbpaste, pbcopy
set-option -g default-command "zsh"
set-window-option -g automatic-rename on
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Setup 'v' to begin selection as in Vim
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel "pbcopy"
# for nvim session
set -g @resurrect-strategy-nvim 'session'
# for restore pane contents
# set -g @resurrect-capture-pane-contents 'on'
set -g @base16-statusline-main-separator ''
# List of plugins
# Supports `github_username/repo` or full git URLs
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'jatap/tmux-base16-statusline'
set -g @plugin 'omerxx/tmux-floax'
set -g @plugin 'omerxx/tmux-sessionx'
set -g @base16-statusline 'main'
set -g status-right "#{prefix_highlight} #[fg=yellow]%H:%M:%S #[fg=white]#{@main_separator} #[fg=green]%y-%m-%d"
# Other examples:
# github_username/plugin_name \
# git@github.com/user/plugin \
# git@bitbucket.com/user/plugin \
# Initializes TMUX plugin manager.
# Keep this line at the very bottom of tmux.conf.
run -b ~/.tmux/plugins/tpm/tpm
setw -g aggressive-resize off