diff --git a/dot_config/fish/config.fish b/dot_config/fish/config.fish index f0fd699..3b229d0 100644 --- a/dot_config/fish/config.fish +++ b/dot_config/fish/config.fish @@ -27,12 +27,15 @@ if status is-interactive type -q zoxide; and zoxide init --cmd=cd fish | source # ========= 编辑器/查看器(优先 vim,否则 vi)========= + # SUDO_EDITOR:供 visudo / sudoedit 等使用;若仍打开 nano,需在 sudoers 中加 Defaults env_keep += "SUDO_EDITOR" if type -q vim set -gx EDITOR vim set -gx VISUAL vim + set -gx SUDO_EDITOR vim else if type -q vi set -gx EDITOR vi set -gx VISUAL vi + set -gx SUDO_EDITOR vi end # ========= fastfetch:启动信息显示 =========