Home Download Buy Blog Forum Support

Go-to/focus other window

Go-to/focus other window

Postby beatlevic on Tue Jun 07, 2011 5:36 pm

Hi,

I tried writing a simple plugin to quickly go to the next (other) window (ctrl+x+o on emacs). However, the required api calls to do so are missing. They used to be in sublime text 1 (: focusView, activeGroup, etc). Am I overlooking something or are these call implemented at a later stage? Any suggestions are welcome.

Thanks,
Coen
beatlevic
 
Posts: 4
Joined: Tue Jun 07, 2011 5:30 pm

Re: Go-to/focus other window

Postby adzenith on Tue Jun 07, 2011 6:47 pm

I found this in Main.sublime-menu:
{ "command": "focus_group", "args": {"group": 0}},

Is that what you're looking for?
adzenith
 
Posts: 1216
Joined: Mon Oct 19, 2009 9:12 pm

Re: Go-to/focus other window

Postby beatlevic on Tue Jun 07, 2011 10:24 pm

Yes, I know it is possible to jump to a specific group. What I want is a function that takes the current group id, adds 1, and focusses on that group (and loop back to 0). For this I need to retrieve the current group, and the number of groups.

In sublime text 1 you would have something like the following:

Code: Select all
groupIdx = (window.activeGroup() + 1) % window.numGroups()
window.focusView(window.activeViewInGroup(groupIdx))
beatlevic
 
Posts: 4
Joined: Tue Jun 07, 2011 5:30 pm

Re: Go-to/focus other window

Postby beatlevic on Wed Jun 15, 2011 11:59 am

I guess I have to be patient for an api update.
beatlevic
 
Posts: 4
Joined: Tue Jun 07, 2011 5:30 pm

Re: Go-to/focus other window

Postby jps on Wed Jun 15, 2011 12:11 pm

These functions are now in the API in 2065
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm

Re: Go-to/focus other window

Postby beatlevic on Wed Jun 15, 2011 9:23 pm

Very nice!!
beatlevic
 
Posts: 4
Joined: Tue Jun 07, 2011 5:30 pm


Return to Plugin Development

Who is online

Users browsing this forum: No registered users and 11 guests