forked from aladdinpersson/coding-environment
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
74 lines (55 loc) · 1.95 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
set -g default-terminal "screen-256color"
set -as terminal-features ",xterm-256color:RGB"
set -g prefix C-f
unbind C-b
bind-key C-f send-prefix
set -sg escape-time 10
set-option -g history-limit 3000
# set-option -g default-shell /bin/zsh # 使用 zsh 为默认 shell
set-window-option -g mode-keys vi # vi key
set-option -g status-keys vi
set-option -g allow-rename off
set -s set-clipboard on
unbind r
bind r source-file ~/.tmux.conf
# vim-like pane selection
bind l select-pane -R
bind j select-pane -D
bind k select-pane -U
bind h select-pane -L
bind -r c-h resize-pane -L 5
bind -r c-j resize-pane -D 1
bind -r c-k resize-pane -U 1
bind -r c-l resize-pane -R 5
bind -r m resize-pane -Z
set -g mouse on
# set-window-option -g mode-keys vi
# bind-key -T copy-mode-vi 'v' send -X begin-selection
# bind-key -T copy-mode-vi 'y' send -X copy-selection
# unbind -T copy-mode-vi MouseDragEnd1Pane
# tpm plugin manager
set -g @plugin 'tmux-plugins/tpm'
# list of tmux plugins
# set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'jimeh/tmux-themepack'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @themepack 'powerline/default/cyan'
set -g @resurrect-capture-pane-contents 'on'
set -g @continuum-restore 'on'
# 在当前目录创建新窗口
unbind-key c
bind c new-window -c "#{pane_current_path}"
unbind-key '"'
unbind-key '%'
bind '"' split-window -c '#{pane_current_path}'
bind '%' split-window -h -c '#{pane_current_path}'
# end
set -g base-index 1 # start windows numbering at 1
setw -g pane-base-index 1 # make pane numbering consistent with windows
set-option -g update-environment "DBUS_SESSION_BUS_ADDRESS DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY"
# 显示工作区标题
set -g pane-border-status top
set -g pane-border-format "#{pane_index} #T"
# initialize tmux plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'