[Vimperator] Patch: :tabmove command

Martin Stubenschrott stubenschrott at gmx.net
Mon May 14 11:36:21 PDT 2007


On Mon, May 14, 2007 at 07:02:12PM +0300, Viktor Kojouharov wrote:
> I'd like to join the discussion, since it was something I also meant to do.
> 
> My ideas on the help are as follows. First and most important, the
> g_Foo variables for settings, commands and mappings have to be broken
> down, and a Help object will be created from most of those.
> the Help object will look something like this
> Help = {
>  [
>     [tag1, tag2, ...],
>     usage,
>     short_text,
>     help_text,
>     maybe type here (whether it's a command, mapping, etc)
>   ]
> }
> 
> and the g_Foo command will change into objects as well, and be added
> to the Vimperator class. All the help stuff will be stripped from
> them, so only the tags (which will be the same for the help and these
> objects) and functions will be left.

I am not yet convinced of this approach, partly because I don't
understand fully how you want to do it.
Especially this:
> and the g_Foo command will change into objects as well, and be added
> to the Vimperator class.

And what's the main advantage of the approach?
A small advantage is that all the help stuff is in help.js

Disadvantages are:
* it's easier to forget to add help for new commands (especially for
  patch writers)
* the help should be integral part of a command, etc. - and with this approach
  they are seperated.

I rather thought of adding a 4th array g_additional_help (or whatever
it's called) which would handle help for things like javascript
commands,etc. and general help like:

g_additional_help = [
	["vimperatorrc"],
	[],
	"The vimperatorrc file...",
	"morehelp",
	"starting" // the section
]

But when I write this, your approach might not even seem so bad, to have
all the help in one big help array. I just don't know what's the best
way to not duplicate the [tags] information which is not only needed for
the help, but also for command line completion, etc.
Probably there isn't a clean way.

Well, as you can see from my confusing post, I don't know myself what's
the best right now.

Doug, as you're also interested in doing work, what's your opinion how
to handle the help best?


More information about the Vimperator mailing list