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

Jump to the next header (h1, h2) using a shortcut #595

Closed
abbiekressner opened this issue Jul 21, 2012 · 2 comments
Closed

Jump to the next header (h1, h2) using a shortcut #595

abbiekressner opened this issue Jul 21, 2012 · 2 comments

Comments

@abbiekressner
Copy link

Is there a way to jump to the next header on a page? For example, I am reading a blog index page, and I want to jump to the next entry. Can I program a shortcut to jump to the next <h1>, <h2>, <h3>, etc. element?

@philc
Copy link
Owner

philc commented Jul 21, 2012

Interesting idea. There is no support for this. I've been using "scroll half page" (d and u) to move between hunks of a page.

@philc philc closed this as completed Jul 21, 2012
@fenuks
Copy link

fenuks commented Apr 16, 2021

I also think it would be very useful option to have, e.g. to skim through long wikipedia articles. Vim has ]] to jump to new section, but it is used for something different in vimium. Please reconsider opening this issue. :)

gdh1995 added a commit to gdh1995/vimium-c that referenced this issue Apr 25, 2021
now support:
```
map <f6> LinkHints.click direct="element" match="h1,h2" directOptions={"offset":"cur","index":"count"}
```

For philc/vimium#595

====

If `mode="focus"`, then always set `currentScrolling`, just in case:
* the target element has been focused before
* a user action / code causes its "previous element" gets "activated", but not focused
* then use `LinkHints.click` to (re-)focus the target

Then the old code would cause a dead loop even when`{"offset":"cur","index":"count"}`,
if `map <f6> LinkHints.click mode="focus" direct="element" dO={...}`
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