Home Download Buy Blog Forum Support

References to all views and windows

References to all views and windows

Postby SteveCooperOrg on Tue Jun 24, 2008 2:28 pm

Hi, guys. I'd like to write some window management commands and I could do with some help. I'd like to automatically close buffers with certain characteristics.

To do this, I need a view list, or a window list, or something like that. I can't figure out how to get it. Actually, the one way I can think is to create a plugin, then manage a seperate list using OnNew, OnLoad, etc. But that seems like a workaround.

So, is there any way I can write something like;

for view in allViews():
if matchesCloseCriterion(view):
view.Close()

Any help appreciated.
SteveCooperOrg
 
Posts: 193
Joined: Thu Mar 20, 2008 9:53 am

Re: References to all views and windows

Postby SteveCooperOrg on Wed Jun 25, 2008 4:29 pm

sweet! cheers.
Maybe what you're looking for is at the http://www.sublimetextwiki.com
SteveCooperOrg
 
Posts: 193
Joined: Thu Mar 20, 2008 9:53 am

Re: References to all views and windows

Postby jps on Sun Aug 10, 2008 11:51 am

FYI, the latest beta now exposes Window.views() to get a list of all views.
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm


Return to Plugin Announcements

Who is online

Users browsing this forum: Exabot [Bot] and 23 guests