Home Download Buy Blog Forum Support

Open_dir always uses Explorer.exe even if custom dir handler

Open_dir always uses Explorer.exe even if custom dir handler

Postby robertcollier4 on Mon Mar 11, 2013 8:48 am

Many Windows users have Explorer replacements such as Total Commander, XYPlorer, Directory Opus, xplorer2, etc. These usually replace explorer.exe via changing the Folder handler in the registry at: [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\]

However - even when someone has a custom folder handler setup - SublimeText currently always opens a folder via Explorer.exe and not through an os-specific way. An alternative to fix this that I have tested is to use os.startfile("C:\folderpath"). For example the following will respect the user's custom directory handler:

Code: Select all
import sublime, sublime_plugin, os

class OpenContainingDirCommand(sublime_plugin.TextCommand):
    def run(self, edit):
        branch, leaf = os.path.split(self.view.file_name())

So please use os.startfile(dirpath) for things such as "Browse Package".

Link to this suggestion on Userecho. Please vote.
Posts: 150
Joined: Sun Feb 24, 2013 5:37 pm

Return to Ideas and Feature Requests

Who is online

Users browsing this forum: No registered users and 8 guests