Sublime Forum

Differentiate between views that have their own tabs


When you begin to type a filename in ST using the Goto menu, the top file is previewed in a new view without a tab, then when you select a file to open, it is given its own tab. I am trying to tweak some of my plugins that run when the file opens so they don’t run during this preview phase. That lead me to investigate the sublime text plugin api, and I have not found what I’m looking for, which has led me here. The sublime.View class appears to be where I would need to look for either an event that fires when a file is opened into a tab, or a flag that tells me if the view has a tab or not, but I can find neither. Is this information available somewhere?



on_load induced by preview in goto anything

Also very interesting in this problem.

Is there some more detailed doc about Views and their lifecycle?