Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

f function #1850

Closed
shoaly opened this issue Oct 5, 2015 · 7 comments
Closed

f function #1850

shoaly opened this issue Oct 5, 2015 · 7 comments

Comments

@shoaly
Copy link

shoaly commented Oct 5, 2015

hello, I would like to give a idea, to make f key more fast when open links

now i realize when f key are pressed, the hint keys are random. is it possible to compare all links with previous page we opened, and give exactly same key hints as the last pages. let me explain why.

I know there are "[" "]" bind for visit next page and previous page . if we make the above function enabled, when i press "f", the current "Next Page" is marked as "PH" , when I go to the next page, it remains the "PH", so i don't need to look at the hint, just type f - PH , I can go to the 3rd page.

@smblott-github
Copy link
Collaborator

Not answering your question, @shoaly, but... Have you tried using filtered mode for link hints (by selecting Use the link's name and numbers for link-hint filtering on the options page.)? Far superior, in my view, and gives you predictable text to type.

I've wondered about your idea before. It'd be problematic if the scroll position was different from visit to visit, and we'd have remember a lot of state (the hints assigned would have to be remembered). And then, we'd have to know how to identify DOM nodes from visit to visit. Not sure it's so easy. Filtered mode is better anyway.

Edit: Minor typos.

@shoaly
Copy link
Author

shoaly commented Oct 5, 2015

thanks reply!

i did not notice that option till you told me. and i tried. :) thanks.

However number area is not as good as the main "ASDFGHJKL" area.

If dig into DOM is not a minutes-work. how about apply a simple version of this idea above, my core idea is try to make hints not that random. let me explain by a example.

Again when I press f, the "Next Page" is marked as "PH" , than I press "PH", we only save the link of the PH(It's dom, may be speed up if the links has classes, ids or attribues, we can filter it more fast I think) , on the "Next Page" , if we found the same links, we maked it as f, so I can use double "f" to quickly go "Next Page" , it is like a runtime redo function, how do you think about it?

@smblott-github
Copy link
Collaborator

However number area is not as good as the main "ASDFGHJKL" area.

Opinion... Filtered hints are superior because you can ignore the numbers and just type the link's text. That text is not random, so you know what you need to type before hitting f. And, Vimium scores links, so if you start typing with the start of the link's text, then Vimium very quickly ranks that link highest, and Enter activates it. But that's off topic.

we only save the link of the PH

We could, but many clickable things don't have links, and -- even if they do -- then the "Next Page" link, say, is different on different pages (even on the same site, e.g. vbulletin).

Perhaps we could sort based on (a hash, perhaps) of the link's text (or perhaps even their CSS), that would work on some pages; but not on pages with variable numbers of links in the viewport.

@smblott-github
Copy link
Collaborator

(Still off topic, @shoaly. To use your example, with filtered hints, fne<Enter> will almost certainly select your "Next Page" link. And you know what to type before hitting f. -- I'm on my soap box, here. I'd love to see filtered hints as the default.)

@shoaly
Copy link
Author

shoaly commented Oct 5, 2015

Thanks again, no doubt , this is your apps, l know your point.

From your example, I understand how easy to navigate to "Next page" By press "fne", when the language is English.

Unfortunately I am a Chinese, a lot of Chinese website use "上一页" as previous page and "下一页" as Next Page, it is more slow if I type "f下" when turning on filtered hints.

Again this is your App, so all by your call.. if you don't agree with me, that's fine.

very handy app, I use it almost everyday, thanks your app

@smblott-github
Copy link
Collaborator

Hmm. I can't think of way of doing this that would work well in the general case. I might be possible to "prioritise" the link which would be chosen by ]], but that still wouldn't give a predictable hint.

@smblott-github
Copy link
Collaborator

Move to #2083.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@smblott-github @shoaly and others