Sublime Forum

Way to add a keyboard shortcut for "Reveal in Finder"

#1

Hi Guys,

Youā€™ve already answered one question for me today so I figured Iā€™d try my luck.

Iā€™ve tried a few ways to bind ā€œReveal in Finderā€ to a keyboard key in Sublime 2 for Mac, no luck.

Could anyone point me in the right direction? Iā€™ve tried the obvious places. System Pref and Keyboard Shortcuts fileā€¦

Thanks in advance!

David.

0 Likes

#2

I donā€™t know what ā€œReveal in Finderā€ is, but you might try this:

sublimetext.info/docs/customizat ā€¦ dings.html

0 Likes

#3

I tried that. No luck. Thanks though! Appreciated. :smile:

0 Likes

#4

Actually, the functionality is sort of already there. If you have a file open in a tab and you secondary-click on the ST2 windowā€™s title bar, you get the standard Cocoa drop-down menu listing the file, the folder itā€™s in, the folder that encloses it, all the way to your HD. Click on the folder containing the file, and that folder is displayed in a finder window; the current file is highlighted.

0 Likes

#5

I know. I just want to access it through a Keyboard shortcut. Iā€™ll ultimately use Afloat if I canā€™t do it within Sublime 2.

Thanks.

0 Likes

#6

If you look in Default/Context.sublime-menu, youā€™ll be able to see all the commands used for the context menu entries. The one for ā€œReveal in Finderā€/ā€œOpen Containing Folderā€ is:

{ "command": "open_dir", "args": {"dir": "$file_path", "file": "$file_name"}  }
1 Like

#7

Sweet! It works.

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

Thanks a bunch. :smile:

0 Likes

#8

Thanks for your contributions!

I know this is a extremely old thread, but I just came across this while looking for ways to add keyboard short cut to the ā€œShow Unsaved Changesā€¦ā€ item in the context menu. In Sublime Text 3, most of resources are hidden in the archive, so the Default/Context.sublime-menu file is no where to be found. Iā€™m adding this here in case someone else is looking for the same information about context menu shortcut.

To get to the file, one should install https://packagecontrol.io/packages/PackageResourceViewer and open the resource Default to find the Context.sublime-menu file. For my case, one should open the Diff resource instead.

0 Likes