-
Notifications
You must be signed in to change notification settings - Fork 38.2k
Description
- VSCode Version: 1.7.1
- OS Version: Ubuntu 16.04
The nautilus file manager in Ubuntu and other GNOME-based Linux distros has a right click "Open with" option available for opening files and or directories. Currently, vscode supports open with for text files but not directories. Since I often open code repositories with vscode, it would be nice to be able to right click and select "open with ... " and then chose "code" to open a new instance of vscode using the directory.
Steps to Reproduce:
- In nautilus, choose a folder. Right click and select "open with" submenu
- Visual Studio Code is not listed in submenu.
If you repeat above with a plain text file, it works.
Nautilus uses the MimeType defined in the *.desktop file for associating applications with a particular file type. For directories, the desired mime-type is inode/directory. Simply changing the following line in code.desktop from
MimeType=text/plain;
to
MimeType=text/plain;inode/directory;
should suffice (though it may be necessary to log in/log out to have change take effect ... alternatively running update-desktop-database and restarting nautilus may work.