Find All In File
This is an extension for Visual Studio Code that allows you to search for all the occurrences of some text within the current document.
The simplest way to get this extension is directly from Extensions Marketplace built into Visual Studio Code.
An alternative way to get this extension is from the Marketplace web page for Visual Studio Code.
After installing this extension in Visual Studio Code, you will have some new commands available:
All of these combinations match the corresponding options in the built-in Visual Studio Code Search interface.
You can use these commands from the Command
Palette by typing
You can can also access these from the editor context menu by right mouse clicking on an open document. The same commands are available, with slightly different names:
For all of these commands you will first be asked to enter a search string. Once you do this, the extension will search the current document, and all the matching occurrences of your search will show up in the Find All In File Side Bar. You can also manually show the Find All In File Side Bar by selecting the corresponding icon in the Activity Bar.
After you complete your search, you will see the results in the Side Bar. You can use these results to quickly preview the matches that were found. If you click on one of the results, it will take you to that location in the document, and the matching text will be selected. It's also possible to view the results view at any time by using the "Find All In File: Focus on View" command. The format of these results is:
The first and last lines in the Side Bar are special. The first line shows you the search you performed, and the last line shows you the summary of the search results. If you select either of these lines, the search results will be copied to the clipboard so you can use text processing tools to interact with the results.
There is a section called "Find All In File" in the Visual Studio Code settings.
If you don't want to Find All In File to add items to your editor context menu, you can disable the
"Editor Context Menu" setting ("findAllInFile.editorContextMenu" in settings.json). The default is
If you want to change the limit on the number of results that will be found, you can modify the "Result Limit" setting ("findAllInFile.resultLimit" in settings.json). The default is 10000, and you can change it to any number, or zero to disable it (no limit).
There is a GitHub issue requesting this feature be integrated into Visual Studio Code. If that ever happens then this extension will become obsolete.
If you have any suggestions for improvements, find any problems, have any feedback, or would like to provide translations for the strings in this extension, please contact me on the GitHub project page
Copyright © 2019 Benbuck Nason.
Released under the ISC license.