Search code examples
textmatesublimetext2sublimetext

Sublime2 Plugin: how to open multiple files in editor?


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

I want the 3 files to be opened and tabbed in Sublime.

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?


Solution

  • At last I 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)