Reopen last closed tab in Visual Studio

If you're using VS 2008, PowerCommands offers a "Undo Close" pane, featuring your recently closed documents, or like David said, check the File menu. PowerCommands doesn't limit the number of files it shows, though.


Also consider Alt+F, Alt+F.

(push Alt and hold it, now while holding it press F and then one more time F).

This will open the Recent Files menu. There, you you use the arrow keys to select a file and open it by hitting Enter, or just use your mouse.

enter image description here


You can with the Visual studio Power Commands using Ctrl + Shift + Z


This is not exactly an equivalent, but it can be helpful, so I would mention it.

There is a much simpler way actually, which is to navigate backward (Ctrl+-). Even if the file is closed, VS opens up the file in a new tab. Of course this is useful only in opening the closed tab immediately after you have closed the tab (ie, if you haven't navigated anywhere else much).


Update:
This is now possible in VS 17.3. By using the Ctrl+K, Ctrl+Z keyboard shortcut, or navigating to the menu item under Window > Restore Closed Tab. Reference: https://devblogs.microsoft.com/visualstudio/visual-studio-2022-17-3-is-now-available/