-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
97 lines (66 loc) · 3.53 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
# --------------------------------------------------- Tmux Config -------------------------------------------------
# 前缀键修改
set -g prefix C-a
unbind C-b
bind C-a send-prefix
bind r \
source-file ~/.tmux.conf \;\
display ' Config Reloading🐇🐇🐇'
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set-option -g default-terminal screen-256color
set -g @plugin 'dracula/tmux' # theme
set -g @dracula-plugins "git time"
set -g @dracula-cpu-display-load false
set -g @dracula-show-powerline true
# set -g @dracula-show-left-sep
# set -g @dracula-show-right-sep
# set -g @dracula-show-left-icon "🐉"
# set -g @dracula-show-left-icon "⛄"
# set -g @dracula-show-left-icon "🎃 👻 🎃"
# set -g @dracula-show-left-icon ""
# set -g @dracula-show-left-icon "🐭"
# set -g @dracula-show-left-icon "🗻"
# set -g @dracula-show-left-icon "🤡"
set -g @dracula-show-left-icon "🍔"
set -g @dracula-show-left-icon "🎸"
# set -g @dracula-show-left-icon "🎭"
set -g @dracula-show-timezone false
# --------------------------------------------------- 更改新增面板键 -----------------------------------------------------------
unbind '"'
bind - splitw -v -c '#{pane_current_path}' # 垂直方向新增面板,默认进入当前目录
unbind %
bind = splitw -h -c '#{pane_current_path}' # 水平方向新增面板,默认进入当前目录
# --------------------------------------------------- 开启鼠标支持 -----------------------------------------------------------
# v2.1及以上的版本
set-option -g mouse on
# --------------------------------------------------- vim 风格 -----------------------------------------------------------
# 绑定hjkl键为面板切换的上下左右键
bind -r k select-pane -U # 绑定k为↑
bind -r j select-pane -D # 绑定j为↓
bind -r h select-pane -L # 绑定h为←
bind -r l select-pane -R # 绑定l为→
# 面板调整大小
# 绑定Ctrl+hjkl键为面板上下左右调整边缘的快捷指令
bind -r ^k resizep -U 10 # 绑定Ctrl+k为往↑调整面板边缘10个单元格
bind -r ^j resizep -D 10 # 绑定Ctrl+j为往↓调整面板边缘10个单元格
bind -r ^h resizep -L 10 # 绑定Ctrl+h为往←调整面板边缘10个单元格
bind -r ^l resizep -R 10 # 绑定Ctrl+l为往→调整面板边缘10个单元格
# 复制模式更改为 vi 风格
# 进入复制模式 快捷键:prefix + [
setw -g mode-keys vi # 开启vi风格后,支持vi的C-d、C-u、hjkl等快捷键
# --------------------------------------------------- 复制粘贴 ----------------------------------------------------
bind -T copy-mode-vi v send -X begin-selection # 开始复制
bind -T copy-mode-vi y send -X copy-selection # 复制剪切板
bind p pasteb # 绑定p键为粘贴文本(p键默认用于进入上一个窗口,不建议覆盖)
# --------------------------------------------------- 其他 --------------------------------------------------------
#设置窗口面板起始序号
set -g base-index 1 # 设置窗口的起始下标为1
set -g pane-base-index 1 # 设置面板的起始下标为1
set -s focus-events on
set-window-option -g automatic-rename on
set-window-option -g monitor-activity on
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
# --------------------------------------------------- End ---------------------------------------------------------