Sublime Text 2/3 shortcut to show/hide/toggle tabs

python, sublimetext, sublimetext2, sublimetext3

Solution

Open the console Ctrl+` and type:

sublime.log_commands(True)

Then click View -> Toggle tabs yourself and observe the console:

command: toggle_tabs

You've got the command name. Now go to Preferences -> Key bindings - User. This opens the JSON config file in the `User` package where you can set your own setting. Add an entry like:

{ "keys": ["ctrl+shift+t"], "command": "toggle_tabs" }

Problem

I'm searching for a way to toggle tab visibility in Sublime Text 2 or 3. I've seen the 'hide tabs' plugin, but it doesn't fit my needs, and neither does this script (the API seems to have changed since 2010). I just want to bind a keyboard shortcut to toggle tab visibility.

Original source