我一直在使用 gedit 作为编程文本编辑器......
我想将最近打开的文件数量从 5 个增加到 10 个...
我检查了 gedit 首选项和 gconf-editor gedit 选项,但没有与最近打开的文件列表相关的任何内容。
我在哪里可以更改此设置?
配置设置/schemas/apps/gedit-2/preferences/ui/recents/max_recents
根据http://people.gnome.org/~bmsmith/gconf-docs/C/gedit.html进行。
根据OP,可以通过发出命令成功更改设置gconftool-2 --type int --set /apps/gedit-2/preferences/ui/recents/max_recents 10
(注意:/schemas
已删除!)
我用 Ubuntu 14.04 尝试了接受的答案,因为 pevik 遇到了添加它没有做任何事情的问题。
相反,我不得不更改 dconf 中已经存在的键:
$ dconf write /org/gnome/gedit/preferences/ui/max-recents '20'
编辑:由于重新启动后 gEdit 的最近使用项目的数量再次减少到 5,我做了一些调查并在 Launchpad 上发现了错误 #1024168,似乎该解决方案根本没有使用dconf
,而是gsettings
:
$ dconf read /org/gnome/gedit/preferences/ui/max-recents
20
$ gsettings get org.gnome.gedit.preferences.ui max-recents
uint32 5
$ gsettings set org.gnome.gedit.preferences.ui max-recents 25
$ dconf read /org/gnome/gedit/preferences/ui/max-recents
25
$ gsettings get org.gnome.gedit.preferences.ui max-recents
uint32 25
因此,似乎信息流 dconf -> gsettings 无法正常工作,而 gsettings -> dconf 按预期工作。附带说明:dconf 声称密钥是有符号的 int32,而 gsettings 声明它是无符号的 int32 ...