Sublime Forum

Open multiple files once created

#1

Hi,

I’m writing a plugin which has a command creating 3 files.

I want the 3 files to be opened and tabbed.

I thought this would do the trick but only one file is opened.

self.view.window().open_file(view_path, 1)
self.view.window().open_file(controller_path, 1)
self.view.window().open_file(base_coffee, 1)

Any insight please?

0 Likes

#2

Found it:

initial_window = self.view.window()
initial_window.open_file(view_path,       1)
initial_window.open_file(controller_path, 1)
initial_window.open_file(base_coffee,     1)
0 Likes