The buzz cut

Ramblings from the barbershop

Reopen Closed Tabs in Sublime Text2

| Comments

I frequently use cmd+shift+t in Chrome to reopen closed tabs, and I’ve often wished that Sublime Text 2 had the same functionality. Several times per day, I’ll accidentally cmd+w a tab and will then have to use cmd+t/p to search for it and reopen it. It’s one of those things that I’ve often thought about, but never took the time to research — until today.┬áIt turns out that it’s pretty damn easy to setup.

Assuming you have Package Control installed:

Go to Sublime Text 2 menu -> Preferences -> Package Control.
Select “Package Control: Install Package.”
Type in “Open Recent Files” and select that package.

Unfortunately, Open Recent Files uses Control+Shit+T, and I’m used to Comand+Shift+T, so I tweaked the key binding by doing the following:

Go to Sublime Text 2 menu -> Preferences -> Key Bindings - User
Add the following:

1
2
3
[
    { "keys": ["super+shift+t"], "command": "open_recent_files" }
]

Restart ST2, open a tab, close it, then Cmd+Shift+T to reopen it. Woo!

Comments