Sublime Forum

Is there a way to 'explore' from current document?

#1

I mean like in many music applications you can open an explorer window from the location of any file… this would be really handy when you need to do stuff to files you have open. Is there a way to do this?

0 Likes

#2

Add this in your keymap file:

{ "keys": "super+`"], "command": "open_dir", "args": {"dir": "$file_path", "file": "$file_name"} }

Unfortunately, i’m not sure if this is from a plugin or is built in. Let me know if this works for you.

0 Likes

#3

I think what you might want is right clicking inside the open file in sublime and selecting Open Containing Folder.

0 Likes

#4

I did a little digging and found that the binding that @iamntz suggests and the menu option that @alanandersen1 describes are actually the same command. You can find it in Packages/Default/Context.sublime-menu and it runs as follows:

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

If, like me, you dislike the mouse and forget your key bindings, there is a third alternative: you can put the command in your Packages/User/Default.sublime-commands and it will be available via the Command Palette.

I wasn’t aware of this command prior to this thread. Really useful stuff!

0 Likes