Follow us on X (Twitter)  Like us on Facebook  Connect with us on LinkedIn  Subscribe to our YouTube Channel  Subscribe to our WhatsApp Group

How to count LOC with Notepad++


Do you know that Notepad++ can be used to count LOC in your source code file? This step-by-step guide will help you. - Article authored 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.

 

How to count LOC with Notepad++

 

To find the LOC of your source files using Notepad++, you can follow the steps mentioned below:

  1. Open your Notepad++ instance.
  2. Press CTRL + SHIFT + F to open the "Find in Files" dialog.
  3. In the "Find what" input box, enter "\S+\s*$" as the regular expression to find out the lines containing some text.
  4. Select the "Directory" for which you want to search.
  5. Under the "Search Mode" section, select the "Regular expression" checkbox.
  6. Finally, click on the "Find All" button to start the search.
  7. Once the search completes, check the search result in the "Find result" panel to get the total LOC.

How to count LOC with Notepad++

 

Have a question? Or, a comment? Let's Discuss it below...

dhgate

Thank you for visiting our website!

We value your engagement and would love to hear your thoughts. Don't forget to leave a comment below to share your feedback, opinions, or questions.

We believe in fostering an interactive and inclusive community, and your comments play a crucial role in creating that environment.