Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Occurrence CountNew to Visual Studio Code? Get it now.
Occurrence Count

Occurrence Count

madprops

|
1,062 installs
| (3) | Free
Counts the occurrences of the selected word
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

This extension counts the number of occurrences of a selected word.

It uses this regex: \b{selection}(?![\w-])

So basically a word boundary without counting hyphens "-".

This can be used to determine how many times something matches in the document.

For instance:

Client.house 

aaaaaaa bbbbb Client.house.replace("Client.house")

If "Client.house" is selected, it Will show a "3 occurrences" message.

To use this, select a word and run the "Count Occurrences" command.

If there is no selection it will not count anything.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft