Re: Count character in line
- On Wed, 1 Jan 2003, Benji Fisher wrote:
> :help 'report'Thanks a lot! I turned it in
> e +/Count $VIMRUNTIME/macros/matchit.vim
return substitute(v:statusmsg, '^\(.\).*', '\1', '')
but this seems to work properly only if typed by hand. When put in a
function body v:statusmsg still is not set reliably. The 'matchit'
solution turned out to be quite similiar to the solution I already
found, but due to that this seems to become a bit slow with large
strings I'd actually prefer a working solution based on :s. I wished I'd
know why v:statusmsg isn't set always...
- On Wed, 1 Jan 2003, Antoine J. Mechelynck wrote:
> you might set it yourself, e.g.Hi,
> let v:statusmsg = ""
> .s/ etc.
and thanks! I already tried this, but obviously it sometimes isn't set
by :s. I don't know why...