Add a default text editor in the "default applications" settings

Hello,

I know this feature has already been asked and answered but maybe I don’t understand the problem and just need some more explainations about this please?

As a user, I was surprised that the system default editor has changed to editor “A” and I’m used to some other editor “B”. I just want to replace the default text editor for my user and not on the hole system.

Seems this is fairly easy, you just need to tweak with the mimeapps file but I was expecting something easier for the not experienced typical user who don’t know about mime codes…

Maybe there is a technical problem I can’t see that make it complicated or something else?

Thank you.

1 Like

Hi, reading through the old thread, it doesn’t actually seem resolved to me, so your question is valid.

I suspect it’s due to historic reasons that there is no default. You could file an issue with gnome-control-center, but I suspect it will not get any action unless someone comes along with an implementation. It might also be rejected on certain grounds, I personally just can’t think of any.

There’s no technical problem. This is implemented.

For any file, you can change the default app for that file type. Right click the file, select “Open With”, then pick the text editor you want. At the bottom there’s a switch, “Always use for this file type, [File type]”. If you enable that before confirming, then you’ll change the default app that handles that file type.

So, right click a plain text file, select editor B, check “Always use for this file type, plain text”, and then hit “Open”. From then on, plain text files will be opened with editor B.

The thing with plain text files is that a lot of things are plain text files. Source code is plain text, HTML is plain text, CSV is plain text, and so on. So, what does it mean to have a default app for plain text files? You actually have many different apps handling plain text files: IDEs for source code (and potentially different IDEs for different programming languages!), spreadsheet apps for CSVs, browsers for HTML, and so on.

So really, the only file type the plain text editor should open is text/plain. The generic “I can’t tell what’s exactly in this file”. The text/plain app is also used by other text/* file types if they don’t have some more specific app specified, as described in that other thread.

The toggles in Settings are actually more than just a default app setting for some file type. These are actually things you can’t normally change by right clicking on a file in the file browser! Specifically:

  • Web browser: This changes the app that handles http: or https: URLs and text/html files. You can’t change handling of URLs by right clicking a file in the file browser.
  • Mail: This changes the app that handles mailto: URLs, and it’s how clicking a linked email address opens your email app
  • Calendar: This changes the app that handles calendar invites. These are technically just files, but in practice they’re almost always downloaded into a temporary folder by your email client, and you basically never see them in your file browser.
  • Music: this changes the app that handles all the file types in audio/*. Note that this is different from some specific file type. In a file browser, you might change the default app for “MP3” specifically, but here in Settings you change the default for any and all audio files (MP3, FLAC, Opus, Vorbis, etc)
  • Video: Ditto, but with video/*
  • Pictures: Ditto, with image/*
  • Calls: The app that handles tel: URLs. This is how linked phone numbers open your dialer.
  • SMS: The same with text messages. sms: URLs.

I suppose text/plain might be considered kinda special, because it’s the fallback for “any text file that doesn’t have some other app assigned to it already”. So maybe it’s worth having a toggle in Settings too? A designer would have to sign off on it first.

Actually, looks like the designers are already on board. Here’s the current mockup for the default apps settings page:

So, this will get implemented one day. Along with a more comprehensive UI to edit all the default apps for all file types, in Settings. Someone just needs to work on it…

1 Like