1
0
mirror of https://shylinux.com/x/ContextOS synced 2025-05-01 19:19:22 +08:00
ContextOS/etc/conf/tmux.conf
2019-10-31 05:31:12 +08:00

67 lines
1.5 KiB
Bash

# 配置管理{{{
set -g prefix C-s
set -g base-index 1
set -g pane-base-index 1
set -g renumber-windows on
set -g allow-rename off
set -g display-time 5000
set -g display-panes-time 5000
set -g history-limit 1000
set -g mode-keys vi
# }}}
# 会话管理{{{
bind s choose-tree -u
bind q confirm-before "detach-client"
# }}}
# 窗口管理{{{
bind c new-window
bind b break-pane
bind B command-prompt -p "target pane:" "join-pane -v -t %%"
bind e command-prompt -p "window new name:" "rename-window '%%'"
bind m choose-tree -suw -c "swap-window -t %%"
bind o last-window
bind n next-window
bind p previous-window
# }}}
# 面板管理{{{
bind i display-panes
bind x confirm-before -p "kill-pane #P? (y/n)" kill-pane
bind C-o confirm-before -p "kill all other pane(y/n)?" "kill-pane -a"
bind u split-window
bind v split-window -h
bind z resize-pane -Z
bind h select-pane -L
bind l select-pane -R
bind j select-pane -D
bind k select-pane -U
bind C-h command-prompt -p "size:" "resize-pane -L %%"
bind C-l command-prompt -p "size:" "resize-pane -R %%"
bind C-j command-prompt -p "size:" "resize-pane -D %%"
bind C-k command-prompt -p "size:" "resize-pane -U %%"
# }}}
# 缓存管理{{{
bind C-s copy-mode
bind C-d clear-history
bind C-v paste-buffer
bind a choose-buffer
# }}}
# 命令管理{{{
bind Space command-prompt
bind ! command-prompt "run-shell %%"
bind @ confirm-before "source-file ~/.tmux.conf"
bind -t vi-edit C-n history-down
bind -t vi-edit C-p history-up
bind -t vi-edit C-b cursor-left
bind -t vi-edit C-f cursor-right
bind -t vi-edit C-j enter
# }}}