Created
October 19, 2021 12:25
-
-
Save UltraInstinct05/5766e6a8a4bb51cf7e481c19014a847a to your computer and use it in GitHub Desktop.
To open any folder in a new window.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sublime | |
import sublime_plugin | |
class OpenFolderInNewWindowCommand(sublime_plugin.WindowCommand): | |
def run(self, paths): | |
if not os.path.exists(paths[0]): | |
return | |
self.window.run_command("new_window") | |
window = sublime.active_window() | |
window.set_project_data({ | |
"folders": [{ "path": paths[0] }] | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment