Open Containing Folder

Eric Martel 6 years ago • updated by Csaba Bakó 1 month ago 8
When right-clicking on a file tab, it would be useful to have "Open Containing Folder" like in Visual Studio
While this functionality do exists for files in the sidebar folder (NOT the open files), it also needs to be in either tabs or open files in the sidebar.

And it absolutely needs to work for folders in the sidebar folders.

Right now you have to look through 50 folders in sublime. Then you might as well do it directly in finder / explorer.

Another idea would be to open the containing folder if you ctrl-click / ctrl-enter a file in goto anything.  This would also mimic the functionality in OSX Spotlight.
+1 for needs to work on folders. If you have an empty folder on your sidebar, you can't right click to open it in explorer. And it seems odd to have to expand a folder just to find a file just to open the folder; an extra unnecessary step.
You can use the "Reveal in Sidebar" command for this.  Maybe this only works if you are looking at a project and the file is part of that project.
This is requires 2 steps to "Open File Location...", which is annoying especially since right on top of "Reveal in Sidebar" appears "Open File Location..." in the context menu of a view.
I thought I had looked everywhere. But it's right there in the context menu for the view. Super cool.  Many thanks!

"Open containing folder" is available when right clicking inside an open document (instead of file tab)

Great point! I never noticed it there. It should still also be in the context menu for the sidebar and tab, because that's where it makes more sense, but this is an effective "workaround" :)

By default the editor has this item in context menu. If you need this feature on tabs you have to create a file with name "Tab Context.sublime-menu" in "\Data\Packages\User\" (if does not exist yet) and add this code:

        "caption": "-"
        "command": "open_dir",
        "args": {"dir": "$file_path", "file": "$file_name"},
        "caption": "Open Containing Folder…"

Do not forget formatting lines as a JSON file! If you do not need a separator before this menu item you need to delete first block with caption "-"! You can add any other menu item in this file. For example:

    "command": "copy_path",
    "caption": "Copy File Path"

Cheers, Csaba