Reopen last closed tab in Visual Studio

Visual Studio

Visual Studio Problem Overview


Is there any way to reopen the last closed tab in Visual Studio? Similar to Ctrl+Shift+t in FireFox and Chrome?

Visual Studio Solutions


Solution 1 - Visual Studio

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).

Solution 2 - Visual Studio

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

Solution 3 - Visual Studio

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

Solution 4 - 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.

Solution 5 - Visual Studio

I don't know of way to open the last closed tab, but you can open your most recent file through your File Menu and the top one should be your most recently closed tab.

Solution 6 - Visual Studio

in VS 2010 "PowerCommands for Visual Studio 2010"

http://visualstudiogallery.msdn.microsoft.com/e5f41ad9-4edc-4912-bca3-91147db95b99/

Adds a command "Undo Close"

Solution 7 - Visual Studio

You can actually do this (at least in Visual Studio 2019) by pressing Ctrl+T,R which opens a little window which shows the last opened windows.

Source

As NotAPro pointed out, the combination I mentioned seems to have changed to Ctrl+1,Ctrl+R

Solution 8 - Visual Studio

In Visual Studio 2020 you can use Shift+Ctrl+T, which is associated with Reopen Closed Editor. This should do what you're expecting.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionShawnView Question on Stackoverflow
Solution 1 - Visual StudionawfalView Answer on Stackoverflow
Solution 2 - Visual StudioTrident D'GaoView Answer on Stackoverflow
Solution 3 - Visual StudioStormenetView Answer on Stackoverflow
Solution 4 - Visual StudioChris DoggettView Answer on Stackoverflow
Solution 5 - Visual StudioDavid YanceyView Answer on Stackoverflow
Solution 6 - Visual StudioSimonView Answer on Stackoverflow
Solution 7 - Visual StudioBotMaster3000View Answer on Stackoverflow
Solution 8 - Visual StudioEtienne WeilView Answer on Stackoverflow