Created
April 2, 2024 02:45
-
-
Save pengchangg/ff7d79dfdffa43c2375abb100977e38d to your computer and use it in GitHub Desktop.
tmux 配置
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # List of plugins | |
| # git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm | |
| set -g @plugin 'tmux-plugins/tpm' | |
| set -g @plugin 'tmux-plugins/tmux-sensible' | |
| set -g @plugin 'christoomey/vim-tmux-navigator' | |
| set -g @plugin 'tmux-plugins/tmux-yank' | |
| set -g @plugin 'tmux-plugins/tmux-resurrect' | |
| set -g @plugin 'tmux-plugins/tmux-continuum' | |
| set -g @plugin 'catppuccin/tmux' | |
| set -g @continuum-restore 'on' | |
| # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) | |
| run '~/.tmux/plugins/tpm/tpm' | |
| # non-plugin options | |
| set -g default-terminal "tmux-256color" | |
| set -g base-index 1 | |
| set -g pane-base-index 1 | |
| set -g renumber-windows on | |
| set -g mouse on | |
| # visual mode | |
| set-window-option -g mode-keys vi | |
| bind-key -T copy-mode-vi v send-keys -X begin-selection | |
| bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle | |
| bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel | |
| # -------- 分割面板 -------- | |
| # 重新绑定 垂直 水平 分割键 | |
| # -v垂直 tmux会在当前面板下创建一个面板, 视觉像是水平分割. | |
| # -h水平 tmux会在当前面板旁边创建一个新面板, 视觉像是垂直分割. | |
| bind | split-window -h | |
| bind - split-window -v | |
| # 重新映射移动键 | |
| bind h select-pane -L | |
| bind j select-pane -D | |
| bind k select-pane -U | |
| bind l select-pane -R | |
| # 打开鼠标模式 | |
| set-option -g mouse on | |
| # 解决neovim中esc响应慢 | |
| set -s escape-time 0 | |
| set-option -g status-position bottom | |
| # 自动重命名 | |
| # setw -g automatic-rename off | |
| # setw -g allow-rename off | |
| # keymaps | |
| # unbind C-b | |
| # set -g prefix C-Space | |
| # | |
| # set -g status-right '#(hostname) | %a %Y-%m-%d %H:%M' | |
| set -g @catppuccin_flavour 'mocha' | |
| set -g @catppuccin_status_modules_right "application session date_time host" | |
| set -g @catppuccin_status_modules_left "" | |
| set -g @catppuccin_status_justify "left" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment