[Vimperator] [Patch] Proposition for another hint system : f* and f!

Kipling Inscore k at bijna.net
Fri Jun 20 09:12:57 PDT 2008


On Fri, Jun 20, 2008 at 8:31 AM, mahefa randimbisoa
<mahefa.randimbisoa at gmail.com> wrote:
>>
>> Well, just like \ can be changed with :let g:map_leader it should have
>> a similar option for that key.
>>
>
> Here is a draft of the patch to achieve what I talked about.
>
> I say it's a draft, but it realizes all the options I said in the previous mail.
>
> It adds an option hintvoid (default=!) which you can type after f to
> select only void elements.
>
> This is the first time I'm sending a patch, I'm not sure the format is
> correct. (Realized it with TortoiseSVN, the only tool I know and have
> that can create the patch).

I got an offset of -5 lines on each change but I'm not running version
1.1 so maybe five lines have been added to the top of the file since
then.
I suppose that could also change the way this patch interacts with the
rest of vimperator but I think I got an evaluation of the intended
functionality.

>
> Can one please test it? To resume, this is how it works:

I've briefly tested it with gmail, google and slashdot. Haven't seen
it fail yet (note again, version 1.1, not latest).

>
> At any time after you type f, you can type * to switch to
> alphabetic-driven hints, and after this, you type the letters shown in
> the hint to select the link.

I don't quite like the alphabetical ordering of these hints although I
think some people will. perhaps the sequence should be customizable so
that, for example, a QWERTY-centric layout like the old alphabetical
hint system of something like jklfdsahguioprewqytmcxzvnb could be used
(or a dvorak-centric of...?). Just store an array or string, maybe a
few presets.

>
> When you want to select void elements (links that have no text
> associated like blank textareas, blank input, inputbox, ...), you type
> ! after the f. Only void elements will be hinted and hints are formed
> with alphabetic characters only.

I like this mode. One odd behavior is that typing some text to narrow
number of possible links and then pressing the void character will
switch to linking the void links. I don't know whether this would
ultimately be prefereable but perhaps there should be some way, at
least, to escape the void/alpha keys to add them to the link text
search instead of switching mode.
I was also surprised to find that text input areas get searched by
their contents and thus input boxes with...input in them wouldn't be
selected when switching to void mode. This is logical, actually,
probably nothing should be done about this.
Some related ideas for the link hint system: it might be nice to have
alternate modes similar to void--input, images, etc. Perhaps also a
way to hide/show numbered links, which obscure link text (maybe have
number, letter, and nothing as overlay options)...

>
> I'm not aware of some special coding guidelines and coding
> styles/preferences, and I will really appreciate some helps from the
> devs about how to do a proper patch.
>
> _______________________________________________
> Vimperator mailing list
> Vimperator at mozdev.org
> https://www.mozdev.org/mailman/listinfo/vimperator
>
>


More information about the Vimperator mailing list