Visual Studio Code (VS Code) is a simple yet powerful code editor, but it is also possible to check character counts without additional extensions. This article explains how to check the character count using only the basic features of VS Code.
How to check the number of characters
In VS Code, when you select certain text, the number of selected characters is displayed in the status bar. This makes it easy to check the number of characters without the need for additional extensions.
Procedure
- Drag and select the text area where you want to check the number of characters. Or use ctrl a (Windows) or cmd a (Mac) to select all the characters.
- The status bar in the lower right corner of the VS Code window will show “Number of characters in selection”.
This method is especially useful for quickly figuring out the number of characters in a piece of code or a sentence.
Application example: Checking the number of characters in multiple lines or a specific range
When text that spans multiple lines is selected in the same way, the number of characters for the entire selection is displayed in the status bar. This is useful, for example, when counting the number of characters in a commented-out section of code or a specified sentence.
Additional Information: Counting Details
VS Code’s status bar also allows you to see the “character count” and “line count” of the selected range. This allows you to quickly grasp detailed information about the selected range, improving the efficiency of your coding work.