Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to pick from a list of previously opened files in Visual Studio Code?

One of the most useful features of Sublime Text for me was that it keep a history of all the files that I opened. How can I get this functionality in VS Code?

The list of previously opened files/editors when I open cmd+p is really small and it doesn't persist across sessions.

Edit: the problem isn't that I lose my previously opened files when I close the session, but that there is no convenient way of accessing a file I opened a week ago, for example.

like image 814
nachocab Avatar asked Sep 03 '17 22:09

nachocab


People also ask

How do I check my VS Code file history?

When you have repository open in Visual Studio code, you can execute the command Git: View History (git log) from the command Plate. This will open the Git History Window with all change logs for the repository. You can then select individual commits for detailed change logs for each of them.

How do I view recently opened files in Visual Studio?

In Visual Studio 2017 version 15.8 and later, use Go To Recent File to see a list of recently visited files in a solution.

How do I go back to a previous code in VS?

By using alt + left / right arrows ( ctrl + shift + - / ctrl + - ) we can switch directly to the previous/next file in the file history.


2 Answers

To see a list of recently opened files (as of v1.42) try this in the command palette:

View: Show All Editors By Most Recently Used

or use this command workbench.action.showAllEditorsByMostRecentlyUsed in a keybinding.

like image 106
Mark Avatar answered Sep 28 '22 08:09

Mark


On mac it's ⌘ + P.

I'm using mac monterey

like image 22
Shreyansh Panchal Avatar answered Sep 28 '22 06:09

Shreyansh Panchal