Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kevin-ashton/5558822 to your computer and use it in GitHub Desktop.
Save kevin-ashton/5558822 to your computer and use it in GitHub Desktop.
[
{ "keys": ["ctrl+shift+e"], "command": "open_folder_in_explorer" }
]
import sublime, sublime_plugin, os, subprocess
class OpenFolderInExplorerCommand(sublime_plugin.TextCommand):
def run(self, edit):
if self.view.file_name():
folder_name, file_name = os.path.split(self.view.file_name())
command = "explorer " + folder_name
subprocess.Popen(command)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment