Is there any way of counting lines of code within TextPad?
I'm not referring to counting lines of text - i.e. turn on line numbering and look at the last line or using document properties to see how many lines are in a module.
I wondered whether it is possible to directly exlude blank lines from the count. I can think of ways to get the info indirectly but they are all laborious.
TIA,
Steve
Counting LOC
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
Andreas
Re: Counting LOC
The "easiest" way I know is to do a search for ^.+$ (Regex) and replace by & and do a replace all, then look into status bar, i.e. replace all non-empty lines by themselves.
You can also record this as a macro, and then use it with just one click on the macro name in the Macro menue.
Note: this counts all non-empty-lines, i.e. also lines containing only spaces.
To exclude these, use
^[ \t]*[^ \t].*$
for searching, then only lines containing one non-white character are counted.
You can also record this as a macro, and then use it with just one click on the macro name in the Macro menue.
Note: this counts all non-empty-lines, i.e. also lines containing only spaces.
To exclude these, use
^[ \t]*[^ \t].*$
for searching, then only lines containing one non-white character are counted.
-
Andreas
Re: Counting LOC
last part should read:
containing at least one non-white character are counted.
containing at least one non-white character are counted.