Sublime Forum

Go-to/focus other window

#1

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

0 Likes

Cycle through groups
#2

I found this in Main.sublime-menu:

[quote]{ “command”: “focus_group”, “args”: {“group”: 0}},
[/quote]

Is that what you’re looking for?

0 Likes

#3

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:

groupIdx = (window.activeGroup() + 1) % window.numGroups() window.focusView(window.activeViewInGroup(groupIdx))

0 Likes

#4

I guess I have to be patient for an api update.

0 Likes

#5

These functions are now in the API in 2065

0 Likes

#6

Very nice!!

0 Likes