possible to sort vscode Search: Find in Files by date (modified on)?

Viewed 175

Suppose I do:

ctrl+shift+p
Search: Find in Files
<provide search term>

Can I sort the results by recent changes?

Note, all included files are also under version control, if that matters.

1 Answers

It isn't very accessible (not on the search side bar / panel) but there is a setting for this:

Features > Search > Sort Order

And an option to set it to modified like this in JSON:

"search.sortOrder": "modified"

That is still shown grouped by file but at last shows the most recently modified result first.

Related