-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
101 lines (71 loc) · 2.37 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# --- basic
set -g default-terminal "tmux-256color"
set -ag terminal-overrides ",$TERM:Tc"
set -g history-limit 10000
set -g focus-events on
set -s escape-time 0
set -g mouse on
# --- buffer
setw -g mode-keys vi
bind Enter copy-mode
bind -T copy-mode-vi v send -X rectangle-toggle
bind -T copy-mode-vi V send -X select-line
bind -T copy-mode-vi y send -X copy-pipe-and-cancel "xsel -ip && xsel -op | xsel -ib"
bind -T copy-mode-vi Enter send -X copy-pipe-and-cancel "xsel -ip && xsel -op | xsel -ib"
bind -T copy-mode-vi Escape send -X cancel
bind b choose-buffer
bind p paste-buffer
# --- index & name
set -g base-index 1
set -g pane-base-index 1
set -g renumber-windows on
# --- keymaps
set -g prefix C-f
bind C-f send-prefix
unbind C-b
bind C-c new-session
bind c new-window -c "#{pane_current_path}"
bind '\' split-window -h -c "#{pane_current_path}"
bind '-' split-window -v -c "#{pane_current_path}"
bind x kill-pane
bind X kill-window
bind e new-window -n $HOME/.tmux.conf "sh -c \"$EDITOR $HOME/.tmux.conf && tmux source $HOME/.tmux.conf && tmux display \"$HOME/.tmux.conf sourced\"\""
bind r source-file $HOME/.tmux.conf\; display "$HOME/.tmux.conf sourced"
# move between panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# resize panes
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
# swap panes
bind -r < swap-pane -U
bind -r > swap-pane -D
# swap windows
bind -r [ swap-window -t -1\; select-window -t -1
bind -r ] swap-window -t +1\; select-window -t +1
# focus on last window
bind Tab last-window
# --- plugins
set -g @plugin "tmux-plugins/tpm"
set -g @plugin "laktak/extrakto"
set -g @extrakto_key "m"
set -g @plugin "Morantron/tmux-fingers"
set -g @fingers-key "F"
set -g @plugin "wfxr/tmux-fzf-url"
set -g @fzf-url-bind "Q"
set -g @plugin "schasse/tmux-jump"
set -g @jump-key "s"
set -g @plugin "wfxr/tmux-power"
set -g @tmux_power_theme "moon"
set -g @tmux_power_prefix_highlight_pos "R"
set -g @plugin "tmux-plugins/tmux-prefix-highlight"
set -g @prefix_highlight_prefix_prompt "Wait"
set -g @prefix_highlight_show_copy_mode on
set -g @plugin "tmux-plugins/tmux-yank"
if "test ! -d $HOME/.tmux/plugins/tpm" \
"run 'git clone --depth 1 https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"
run "$HOME/.tmux/plugins/tpm/tpm"