From 096a245c1efd46525d830741c97a4bdeacdc184f Mon Sep 17 00:00:00 2001 From: shaoying Date: Thu, 31 Oct 2019 04:35:03 +0800 Subject: [PATCH] opt tmux.conf --- etc/conf/tmux.conf | 66 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 etc/conf/tmux.conf diff --git a/etc/conf/tmux.conf b/etc/conf/tmux.conf new file mode 100644 index 00000000..5a22e9b2 --- /dev/null +++ b/etc/conf/tmux.conf @@ -0,0 +1,66 @@ +# 配置管理{{{ +set -g prefix C-s + +set -g base-index 1 +set -g allow-rename off +set -g renumber-windows on + +set -g display-time 5000 +set -g display-panes-time 5000 + +set -g mode-keys vi +set -g history-limit 1000 +setw -g pane-base-index 1 +# }}} +# 会话管理{{{ +bind s choose-tree -u +bind q confirm-before "detach-client" +# }}} +# 窗口管理{{{ +bind c new-window +bind b break-pane +bind B join-pane +bind B choose-tree "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 u split-window -c "#{pane_current_path}" +bind v split-window -h -c "#{pane_current_path}" +bind U split-window -f -c "#{pane_current_path}" +bind V split-window -f -h -c "#{pane_current_path}" + +bind h select-pane -L +bind l select-pane -R +bind j select-pane -D +bind k select-pane -U + +bind C-o confirm-before -p "kill all other pane(y/n)?" "kill-pane -a" +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-m display-panes "swap-pane -t %%" +bind C-u display-panes "move-pane -v -t %%" +bind C-v display-panes "move-pane -h -t %%" +# }}} +# 缓存管理{{{ +bind C-s copy-mode -e +bind C-d clear-history + +bind a choose-buffer +bind z paste-buffer +# }}} +# 命令管理{{{ +bind Space command-prompt +bind ! command-prompt "run-shell %%" +bind @ confirm-before "source-file ~/.tmux.conf" +# }}} +