Monday, February 22, 2010

Re: Counting Lines between two markers

Tim Chase wrote in news:4B8096B0.1050200@tim.thechases.com:

> zzapper wrote:
>> Hi
>> :'a,'bs/^// will count the lines between two markers a and b but is
>> :there any
>> more elegant way, one that is not seen as an edit?
>
> You can add the "n" flag
>
> :'a,'bs/^//n
>
> Or you can do the math (adjust for fenceposting):
>
> :echo line("'b")-line("'a")
>
Thanks all answers useful

--
zzapper
http://zzapper.co.uk/ Technical Tips

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

No comments: