Count LOC with Notepad++

| category: Programming | author: st

Notepad++ can count LOC (lines of code) of source files and give you the estimation of code size.

Press Ctrl+Shift+F shortcut to start "Find in files" dialog. Select "regular expression" search mode and start it.

Notepad++ LOC count

Some regular expressions:

  • \S+\s*$ -- all non-empty lines
  • ^\s*$ -- only empty (white-space) lines
  • ^\s*class [^;]+$ -- count class declarations (good metric with LOC ratio)

blog comments powered by Disqus