Ali Ua
Ali Ua

Reputation: 71

save search on visual studio code

I am having a trouble with VS code. I would like to save the search results so I can get back to it again. specially since there is a lot of results and I do delete/filter them manually by clicking on x dismiss button.

I used the Open in editor, which open new tab with all results however it's not useful since I can browse the results quickly or reopen it again in the search pane.

Regards,

Upvotes: 8

Views: 3466

Answers (2)

ADTC
ADTC

Reputation: 10086

When you have some search results which you want to save, you can click on the "Open in Editor" link shown next to the results summary.

This will open a text file with the similar search bar on top, and your current search results will be loaded in a text file format. You can press Ctrl-S or use File > Save to save it in a .code-search file.

You can close and re-open this file any time to view the results. You can click "Search Again" to refresh the results (note, this will lose any customization and bring back dismissed results). You can use Ctrl-click to jump to files or lines mentioned in the search results.

Unfortunately you cannot reload this back into the search pane (AFAIK). However, since Editor pane can be split, you can split this file's editor to a separate pane on the side, and close the Search pane.

Upvotes: 8

Guillermo Brachetta
Guillermo Brachetta

Reputation: 4745

From I believe version 1.41 of VSCode you have a separate search editor which I guess will do what you're looking for.

Just open you command palette and search for "Open search editor". You will be presented with a couple options (open and open to the side).

Upvotes: 3

Related Questions