Setting VSCode as the default Gnome editor

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 

➜ xdg-mime default code.desktop text/plain

➜ xdg-mime  query default text/plain  

You can also check the list of existing applications by searching for *.desktop files installed in your system, eg:

➜ find /usr/share/applications  -name "*.desktop"

Happy hacking!