当前位置: 首页 > 工具软件 > .tmux > 使用案例 >

自定义tmux指令的conf参数配置

曾喜
2023-12-01

记录一下自己的.tmux.conf,.vimrc

~/.tmux.conf

set -g default-terminal "screen-256color"
set -g prefix C-a
bind C-a send-prefix
unbind C-b
bind r source-file ~/.tmux.conf \; display "Reloaded!"
set -g base-index 1
setw -g pane-base-index 1
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind "%" split-window -h -c "#{pane_current_path}"
bind "\"" split-window -v -c "#{pane_current_path}"
#bind c new-window -c "#{pane_current_path}"
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
setw -g mode-keys vi
set -g mouse on

然后使用 source ~/.tmux.conf
如果出现source 报错:
-bash: bind-key: command not found
-bash: bind-key: command not found
-bash: unbind: command not found
-bash: bind-key: command not found,

可以使用:
tmux source ~/.tmux.conf 即可

~/.vimrc

set encoding=utf-8
set langmenu=zh_CN.UTF-8
language message zh_CN.UTF-8
set fileencodings=ucs-bom,utf-8,cp936,gb18030,big5,euc-jp,euc-kr,latin1
set nocompatible
set number
syntax on
 类似资料: