I want to change the default text editor in KDE (FWIW: from Kate to code-oss). I know I can go to Settings->File Associations and change it tenths of times :( Is there an easier way to do it?

1 Answer 1


(Replace the old answer by a better, cleaner, easier suggestion by kralyk. Copy from https://stackoverflow.com/questions/22368931/change-default-text-editor-in-fedora-20-kde#comment55074051_22389163)

There actually is a central location - kind of. When you change preferences for text/plain, you'll find out it's reflected in a whole bunch of other file types as well, because they somehow derive from text/plain. But it's not immediately visible.

Following, the old answer

The file that contains the "default text editor" setting is /etc/xdg/kde-mimeapps.list. So use nano (or your preffered editor) as super user

sudo nano /etc/xdg/kde-mimeapps.list

and then change the text/plain settings. I changed min to code-oss.desktop which is the Code OSS editor.

  • 1
    This trick also works in the file associations settings mime types by setting text/plain as well via the settings GUI. Sep 24, 2020 at 13:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.