On Sunday, March 30, 2014 5:59:34 PM UTC+4, Andre Sihera wrote:
> On 30/03/14 22:46, Dmitry Frank wrote:
> 
> > let my_str = "こんにちわ世界"
> 
> > let match_start = match(my_str, "世界", 0, 1)
> 
> > echo strchars(my_str[: match_start - 1])
> 
> So it is.
> 
> And the reason I didn't know about this cunning trick is due to a
> documentation bug.
> 
> The function strchars() works perfectly in my version of ViM 7.3.475
> but a scan of the online help yields no reference to strchars() anywhere.
> It is *completely* hidden (except if I rummage through the source code).
> 
> Furthermore, in the online (internet) help, the function appears here:
> 
> http://vimdoc.sourceforge.net/htmldoc/eval.html#functions
> 
> but not here:
> 
> http://vimdoc.sourceforge.net/htmldoc/usr_41.html#41.6
> 
> I always use the second page for functional reference as its grouped by
> data object type/functional category which is far easier to navigate if
> I'm looking for a function to do something I haven't done before.

There are a few competing Vim online help sites. Except for “official” one some 
were referenced in this list. I own another one:

    http://vimpluginloader.sf.net/doc/eval.txt.html#functions

. Personally I use only vim offline help system though, this site is only for 
hosting documentation of my plugins (vim own help is there because my plugins 
refer to it, so I have chosen to include all vim help files rather then have 
missing or dead links).

My site uses my format.vim plugin (so highlighting is the same as vim uses). 
Another one referenced somewhere in this list used python script (which 
generated far less markup effectively requiring less bandwidth). Don’t remember 
how that variant looked, but vimdoc looks like a crap: almost no highlighting. 
AFAIR that was better then vimdoc. Did not save a link though.

If I am not mistaking all but my sites use cron job to update. My updates when 
I trigger update manually or when I release a new plugin version. No sites have 
custom version of documentation, so strchars() will not be mentioned in 
*usr_41* until vim help mentions it there.

> 
> Like process Japanese string data, for example.
> Well, now I know. Thanks very much for your insights.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui