When you search for a string in Visual Studio Code with Ctrl-F it doesn't display number of occurrences.
Is it possible to find out somehow?
On the other hand it displays a number of hits next to a filename when you search all files with Ctrl-Shift-F.
Press F1 to open Command Pallete. Search for Vscode counter : count lines in directory. Select the directory for which you want to count. Press enter and you have all the statistics.
Ctrl+D selects the word at the cursor, or the next occurrence of the current selection. Tip: You can also add more cursors with Ctrl+Shift+L, which will add a selection at each occurrence of the current selected text.
VS Code allows you to quickly search over all files in the currently-opened folder. Press Ctrl+Shift+F and enter in your search term.
I had the same problem as csonuryilmaz mentioned in the comment to this answer, I needed the exact count of the string, even if it is 19999+. I ended up opening the file in Notepad++, there you can count all occurences when searching for a string.
Maybe not the best solution if you want/have to use only Visual Studio Code, but for my problem this was a good enough workaround.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With