Quick post. I had the need to change the default Gnome editor from gedit to
VSCode. There isn't a straight-forward way to do this, so I found this quick
way and wanted to make a note in the blog so I don't forget
➜ xdg-mime query default text/plain gedit.desktop ➜ xdg-mime default code.desktop text/plain ➜ xdg-mime query default text/plain code.desktop
You can also check the list of existing applications by searching for
files installed in your system, eg:
➜ find /usr/share/applications -name "*.desktop"