Text Editor has really been shaping up in the past couple weeks as we race towards getting things ready for GNOME 42.
We removed the preferences sidebar experiment because it was a bit clunky and none of the other core apps shared the design metaphor. Instead we’ve brought back a preferences dialog, albeit with an improved design. It builds on the previous
GtkSourceStyleSchemePreview work but with a filtered set based on the current light/dark desktop setting.
The “Open” popover also got another round of design work based on using it for a while. The style is a bit slimmer and more to the point. It is also much more keyboard navigable now. It’s nice to be able to hit Ctrl+K, type a few characters, and either hit Return to open the first match or navigate through the list with arrows. Escape will return you back to the editor. Easy stuff.
I added a
GSetting for those that rely on visual spaces. Even though there is no UI for this at the moment you can still get what you want fairly easily using the
gsettings command line tool.
flatpak run --command=gsettings org.gnome.TextEditor.Devel \ set org.gnome.TextEditor draw-spaces \ "['space','tab','trailing']"
If you’re feeling experimental you can even try my easter egg to test out the Vim emulation using
GtkSourceVimIMContext. It probably will never be an advertised feature, but it’s there.
flatpak run --command=gsettings org.gnome.TextEditor.Devel \ set org.gnome.TextEditor keybindings vim # or "default"
The most visual piece of work this week was in introducing recoloring support. It builds atop libadwaita and uses a CSS provider to override the colors in the theme. I expect there will be a recoloring API in the not-too distant future for libadwaita which will provide this for us.
When you select a style-scheme Text Editor will now use the colors defined in the scheme to alter how the entire application looks. For example, below are screenshots for a number of style-schemes both bundled with GtkSourceView and found on the internet.
As always, I tend to be slow to blog but quick to drivel over here.