EDIT
To make this the default for all future users in the world, you would need to go with a feature request, in one of several forms:
- Best option: a feature request for the individual application https://gitlab.gnome.org/GNOME/gedit/-/issues
- In Launchpad. Mark the bug with the tag
[Wishlist]
https://bugs.launchpad.net/ubuntu/+filebug
- Other options in Where can I send feature requests?
Then you would have to wait for it to be (1) accepted and (2) implemented...
it is not up to you.
You could contribute by developing the change (item 2 above). It may be not really hard.
Note: Given that the default behavior is often times a matter of taste (and I think this is one such case), you might likely have to settle for what was posted in the Original answer below.
Sources / related:
- https://wiki.gnome.org/Apps/Gedit/ReportingBugs
- https://www.reddit.com/r/Ubuntu/comments/3uo0u6/quick_question_how_do_you_submit_a_feature/
Original answer
gedit
preferences, like other GNOME settings, are generally stored via the GSettings API, which is an implementation of the DConf specification.
This stores the settings in a binary database.
The way to read from / write to this is via gsettings get
/ gsettings set
, or dconf dump
/ dconf load
.
So for only the tabs-to-spaces you would use
$ gsettings set org.gnome.gedit.preferences.editor insert-spaces true
$ gsettings set org.gnome.gedit.preferences.editor tabs-size 4
For all gedit
settings you could use
$ dconf dump /org/gnome/gedit/preferences/editor/ > gedit-settings.ini
$ dconf load /org/gnome/gedit/preferences/editor/ < gedit-settings.ini
(with a different user).
To make this the default for all future users in your system, you can set system-wide dconf
settings by storing them in a text file under /etc/dconf/db/local.d
and running dconf update
.
Only include here the settings you need.
As opposed to the EDITed part, you have control over this.
Sources / related:
- How to save GNOME settings in a file?
- https://help.gnome.org/admin/system-admin-guide/stable/dconf-custom-defaults.html.en
- https://unix.stackexchange.com/questions/289640/how-to-create-a-default-system-wide-dconf-setting-starting-from-just-created-ad
- https://unix.stackexchange.com/questions/8922/where-does-gsettings-store-its-files
- https://mail.gnome.org/archives/gedit-list/2015-November/msg00002.html
- Where are gedit's preferences?