如何使用不同的配置运行 gedit

Met*_*ark 8 startup configuration gedit programming ide

我想将 gedit 用作编程 IDE 和常规文本编辑器。我可以制作一些 .desktop 文件来加载不同的配置吗?

hto*_*que 5

现在似乎不支持它,请参阅此上游错误报告

但是,您可以为 gedit 创建一个包装器,通过 gconftool-2 设置您想要的特定插件。

这看起来像:

#!/bin/bash
old_config=$(gconftool-2 --get "/apps/gedit-2/plugins/active-plugins")
gconftool-2 --set --type list --list-type string "/apps/gedit-2/plugins/active-plugins" "[$1]"
gedit
gconftool-2 --set --type list --list-type string "/apps/gedit-2/plugins/active-plugins" "$old_config"
Run Code Online (Sandbox Code Playgroud)

现在将其保存在某处,例如。gedit_profile 并使其可执行:

chmod +x  gedit_profile
Run Code Online (Sandbox Code Playgroud)

要加载不同的配置文件,只需使用要启用的插件的逗号分隔列表调用它,例如:

/path/to/gedit_profile "terminal,colorpicker"
Run Code Online (Sandbox Code Playgroud)

[当然你可以把它放到单独的启动器中。]