Sublime Forum

When creating a new group, use the last viewed document in the original group

#1

When creating a new group in Sublime I usually do this when I realize I’ve been switching between two files and need another group so I can see them side-by-side. Currently, it opens the new group, putting the current file in focus in the new group and uses the next tab to the right for the original group’s focused file. If these files are far apart in the tab list, I may have to go hunt down the file I want before the group creation (hunt may be a strong word). It would be nice if I could just get the last viewed file in the original group instead of the one to the right of the file that moved to the new group. This would supplement the reason I created the new group and would allow me not to “hunt” down my original file.

Please let me know if there is some other standard way of doing this aside from requesting a feature, thanks!

0 Likes

#2

A merger bump from a humble requester.

0 Likes

#3

Moving files and creating panes is implemented in the Default package’s pane.py.

While ST knows about the history of the last focused views, it does not respect it when removing a view from a focus group. Same issue exists with closing files.

One would need to create a patched pane.py which includes tracking active views in groups or better ask the core devs to handle that situation “properly”.

0 Likes

#4

Appreciate the feedback @deathaxe, I figured this would have been mentioned previously for such a mature product. I’ll try out @Markus_Gritsch’s change on that ticket until it gets a priority bump. Thanks!

0 Likes