Reputation: 19803
Is there any way to reopen the last closed tab in Visual Studio? Similar to Ctrl+Shift+t in FireFox and Chrome?
Upvotes: 191
Views: 83055
Reputation: 59
In VS Code Version 1.80.1
Upvotes: 0
Reputation: 19690
Also consider Alt+F, Alt+F.
(push Alt and hold it, now while holding, press F and then press F again).
This will open the Recent Files
menu.
There, you can use arrow keys to select a file and open it by hitting Enter, or just use your mouse.
Upvotes: 80
Reputation: 73183
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/
Upvotes: 236
Reputation: 165
In Visual Studio Code 2020 you can use Shift+Ctrl+T, which is associated with Reopen Closed Editor. This should do what you're expecting.
Upvotes: 13
Reputation: 482
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.
As NotAPro pointed out, the combination I mentioned seems to have changed to Ctrl+1,Ctrl+R
Upvotes: 11
Reputation: 26468
You can with the Visual studio Power Commands using Ctrl + Shift + Z
Upvotes: 49
Reputation: 34840
in VS 2010 "PowerCommands for Visual Studio 2010"
http://visualstudiogallery.msdn.microsoft.com/e5f41ad9-4edc-4912-bca3-91147db95b99/
Adds a command "Undo Close"
Upvotes: 11
Reputation: 20757
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.
Upvotes: 30
Reputation: 2030
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.
Upvotes: 20