Open KiaraGrouwstra opened 1 month ago
You may use LinkHints.click
to switch focus among some elements.
For example, on a Google search result page, this will switch focus among search result items:
map xxx LinkHints.click mode="focus" match="a:has(h3)" directOptions={"offset":"cur","search":"doc","loop":1}
# then `xxx` will go down and `-xxx` will go up
Note: loop
in directOptions
requires Vimium C v2.0+ .
that's pretty cool! i hadn't realized vimium already offered things like this.
i feel that approach may still pose a barrier to casual users though, as it both requires a basic understanding of CSS selectors, while selectors like a:has(h3)
are also circumstantial, making them harder to reuse across a wider range of web pages.
i'll admit the attempt i made also wasn't really perfect yet. but it'd be nice to see more general approaches explored here as well.
Yes a:has(h3)
is too exact to reuse - it may not work on other websites.
You may use env
to bind one key to multiple commands, like:
As for CSS knowledge, because Vimium C is designed to "advanced computer users" (especially programmers), it would not block Vimium C users, I guess.
What command or commands
Add a new mode to navigate elements on a page, not unlike arrow keys on duckduckgo.
How should a feature do
When a user has done such steps:
c
?)then Vimium C should do:
The user should also be able to exit this mode again.
I made something like this here (not tested as well with SPAs).