Try adding an entry for
text/plain to the top of
For this to work the file
/usr/share/applications/gedit.desktop needs to exist. If it doesn't, it sounds like your
gedit package is broken; try forcing a reinstall as suggested here.
Switching the Default GUI Text Editor
If instead you want to set a different text editor such as Geany as the "default", so that "Open With Geany" shows for all text files instead of "Open With Text Editor":
First, create a file named e.g.
~/.local/share/applications (there are probably already several
.desktop files in there) with the following contents. This question can help with that.
Then, edit the
~/.local/share/applications/mimeapps.list file and an entry for
text/plain at the top of