If you are using chrome there is a shortcut control+shift+t (command+shift+t for mac) that reopens the last tab you closed in the same state it was in (or at least it attempts to keep the state, you'll have to experiment with it). The feature you are requesting would be nice but this might help you in the mean time. EDIT: Just tried putting some code in the script tab then cmd+w followed by cmd+shift+t and it did not keep the code changes So i guess this wont fix your problem but its a nice shortcut anyway