exe*_*ook 7 configuration command-line text-editor environment-variables
当您使用vipw
或crontab
或仅键入时select-editor
,您将看到系统上安装的编辑器列表。如何将自定义编辑器添加到该列表中?
要向 Debian 替代系统添加额外的替代应用程序,请使用
sudo update-alternatives --install link name path priority
Run Code Online (Sandbox Code Playgroud)
要添加其他编辑器,请运行以下命令:
sudo update-alternatives --install /usr/bin/editor editor /usr/bin/your-custom-editor 50
Run Code Online (Sandbox Code Playgroud)
其中第三个条目--install
是自定义编辑器的可执行文件。第一个条目是加载所选编辑器的通用命令,第二个条目是替代应用程序组的名称。必须给出该数字并表示优先级。
之后,您应该能够使用 或 选择自定义编辑sudo update-alternatives --config editor
器sudo select-editor
。
您可以在此处了解有关 Debian 替代系统的更多信息。