Is there a way to make a WindowCommand that opens a new file in a new window? If so, how? I thought the command called with Ctrl + Shift + N would be defined in a .py file inside the Default package, but I can’t find such definition.
How can I create a command to open a file in a new window?
r-stein
#2
Not sure what’s the best way to do it, but you can just call the new new_window
command (ctrl+shift+n) and then get the current window and operate on it:
sublime.run_command("new_window"); w = sublime.active_window(); w.open_file("my_file.txt")
1 Like