Intelij: prevent open file/directory with vscode

Intelij: prevent open file/directory with vscode

For me, it is so annoying that the "Show in Files" menu in Intelij IDE is replaced with "Show in Visual Studio Code" after installing VS Code. The "Open In" menu is also changed from "Files" to "Visual Studio Code".

Screenshots after pressing ctrl + shift + @.

After installing VS Code
Expected

Screenshots of the right-click menu:

After installing VS Code
Expected

To fix this, open these files:

  • $HOME/.config/mimeapps.list
  • /usr/share/applications/mimeinfo.cache
  • $HOME/.local/share/applications/mimeinfo.cache

Find the line starting with inode/directory=, and move org.gnome.Nautilus.desktop; to the beginning after the equal = sign. If the line does not exist, skip the edit.

Before edit:

inode/directory=code.desktop;org.gnome.Nautilus.desktop;

After edit:

inode/directory=org.gnome.Nautilus.desktop;code.desktop;

It is worth noting that code.desktop is looked up at /usr/share/applications/code.desktop.

Save the file and restart the Intellij IDE.

Buy Me A Coffee