One way would be (assuming contents in unnamed register)
strridx(substitute(@", "[^\n]", "", "g"), "\n") + 1
(Had strridx accept "expr", this could have done with a single call to
strridx, I believe)
On Tue, 2 Apr 2002 yahoogroups@... wrote:
> How can I count the number of lines in a register?
> I was thinking of a user-defined command like
> :LineCount a
> Can I use some Vim function to do this quickly?
> Thanks a bunch
> Do You Yahoo!?
> Yahoo! Tax Center - online filing with TurboTax