[Vim-l] Template:Help - Alternatives

John Beckett johnb.beckett at gmail.com
Wed Jun 27 10:34:17 UTC 2007


Sebastian Menge wrote:
> the urlencoding works great as it is.

Please think this over some more. It's just a fact of life that
a CGI query SHOULD be urlencoded.

Here is an example where urlencoding is essential:

For ":help :set-&vim", the help link would be:

http://vimplugin.sourceforge.net/cgi-bin/help?tag=:set-&vim

I put the above URL manually into a browser and captured the
resulting network traffic. The response includes:

Error! Tag ":set-" not found in help!

This message proves that your CGI script was given ":set-" as the
tag value. However, it should be ":set-&vim".

I'm sure other examples could be found, but I don't know the
exact rules for what needs to be urlencoded.

I am no expert in this area, but I am confident that a CGI query
that can include punctuation should be urlencoded. The script
handling the query has to urldecode the tag value.

> there is simply no line for <tab> in the tags file

OK. I imagined that the angle brackets would need to be
urlencoded, but it appears they don't.

However, the tags file does include "<Tab>". That shows another
glitch. Vim :help looks for the exact case you entered, but if
it doesn't exist, the nearest match will be used.

So, in Vim, ":help <tab>" shows the correct help location, but
on the wiki, you would have to enter {{help|<Tab>}} (using the
correct case for "Tab"). (BTW entering {{help|<Tab>}} in the
wiki shows wrong text - I can't make &lt; work either.)

I have investigated case sensitivity in the Vim tags file. There
are 292 examples (like "word" and "WORD") where a tag appears
twice in the list, and where it doesn't matter because both
examples go to the same page (motion.txt for "word" and "WORD").

However, there are 23 examples (like "zE" and "ze") where two
tags that are the same ignoring case, in fact go to different
pages. Only half a dozen of those matter.

It's hard to know whether it would be better to:
- Ignore case and be wrong for ":help ze" and a few more. -or-
- Be case sensitive, and fail when wrong case is entered.

John



More information about the Vim-l mailing list