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.
You can change this setting from the default value of
- Type ⌘-K on your Mac or Ctrl-K on Windows and Linux
Search:Quick Open:History:Filter Sort Orderinto the search field
- Use the dropdown menu beneath Controls sorting order of editor history in quick open when filtering and set it to recency.
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
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.