I doubt this can be done with the current version of TextMate but I want to put it out there and see what people suggest.

When working on git repositories, I find myself jumping from branch to branch often. We use branches heavily in my company for everything from little on-demand bug fixes to entirely new features. Most times switching branches means closing all tabs and opening tabs relevant to the selected branch. It also often involves expanding a number of folders in the drawer but this happens less often as I am a keyboard freak and rarely use the drawer.

It would be awesome if switching branches could trigger TM to close the current tabs and open the ones being worked on the last time this branch was selected. Even better if cursors were moved to the right positions too.

Now, I realize this is too specific for TM to have natively but it would be nice nonetheless. I wonder if a plugin could do this? Maybe by using git branch identifiers as keys to layout specifications that can be saved elsewhere as plugin data.

Does this sound doable? Can anyone point me in the right direction to documentation that I can use to maybe give this a shot? I'm happy to work on a plugin if people are interested in something like this.

Cheers.

Luis