How to count LOC with Notepad++
Do you note that Notepad++ can be used to count LOC in your source code file? This step-by-step guide will help you.- Article by Kunal Chowdhury on
Visual Studio has a nice feature to calculate the Lines of Code (LOC) in source files. But do you know that you can also use Notepad++ to find the Lines of Code (LOC) in your source files in a directory? Here we will show you how to do it.
To find the LOC of your source files using Notepad++, you can follow the steps mentioned below:
- Open your Notepad++ instance.
- Press CTRL + SHIFT + F to open the "
Find in Files " dialog. - In the "
Find what " input box, enter "\S+\s*$" as the regular expression to find out the lines containing some text. - Select the "
Directory " for which you want to search. - Under the "
Search Mode " section, select the "Regular expression " checkbox. - Finally, click on the "
Find All " button to start the search. - Once the search completes, check the search result in the "
Find result " panel to get the total LOC.