VSCode offers a practical menu to quickly open files that have been opened recently or that are found in the current workspace based on typing a few characters of the file name.
You can open this file by hitting ⌘-P on your Mac or Ctrl-P on Windows and Linux.
Using the VSCode UI
You can change this setting from the default value of default
to recency
.
- Type ⌘-K on your Mac or Ctrl-K on Windows and Linux
- Enter
Search:Quick Open:History:Filter Sort Order
into the search field - Use the dropdown menu beneath Controls sorting order of editor history in quick open when filtering and set it to recency.
Editing the settings.json
file
If you prefer to edit the settings.json
directly, add the key–value pair search.quickOpen.history.filterSortOrder
and set it to recency
under the root-level key settings
,
Example: Change workspace settings
You can also add the below snippet to your workspace or folder settings.
This setting was introduced via this feature request on GitHub regarding the inconsistent ordering of recently opened files in the Quick Open menu. I have no idea why the VSCode developers decided to keep the default setting other than backward compatibility.