philc / vimium

The hacker's browser.
https://chrome.google.com/webstore/detail/vimium/dbepggeogbaibhgnhhndojpepiihcmeb
MIT License
23.53k stars 2.49k forks source link

J and K for tab shifting stops working if a pdf is opened in some tab.. #2480

Open abe312 opened 7 years ago

smblott-github commented 7 years ago

It should work in the most-recent Chrome Store version. Make sure that you aren't in insert mode (i.e., hit Escape).

abe312 commented 7 years ago

I just realised that normal navigation "hjkl" isn't working in pdf opened in chrome either... any help will be appreciated :) and I'm not in insert mode

mrmr1993 commented 7 years ago

PDFs are shown using a plug-in, which can't (AFAICT) be controlled using JavaScript, nor any extension APIs. For the time being, we have no way of scrolling, clicking links in PDFs, etc. Sorry.

abe312 commented 7 years ago

is it possible that some 3rd party pdf plugin would have support for vimium?

mrmr1993 commented 7 years ago

I believe pdf.js is your best bet. This comment may be useful.

I'll also note that Vimium (current master branch) works as expected with PDFs on Firefox, since they use pdf.js out-of-the-box.

abe312 commented 7 years ago

thanks for that man. But after installing pdf.js extension, I found out that it does support navigation, but the navigation isn't continuous scroll like down arrow key. it is using one page per "j/k" keystroke.

rjb25 commented 7 years ago

For tab shifting just use Shift-t to go directly to the desired tab, or use the chrome shortcuts Ctrl-Tab and Ctrl-Shift-Tab. This is what I do to avoid getting hung up on inputs or certain google pages which do not allow vimium.

etremel commented 5 years ago

I'm a longtime user of Vimium, and this bug is still annoying for me. I know that I can't use Vimium's scrolling keys to navigate PDFs because PDFs can't be scrolled with JavaScript, but I would at least like to be able to navigate away from a PDF tab using Vimium's J and K keys. I hate how when I'm switching through tabs with J and K, I get "stuck" as soon as I land on a PDF tab and have to reach back for the mouse in order to escape from it. Shouldn't Vimium's tab navigation continue to work even if the contents of the tab itself can't be controlled by Vimium?

nijynot commented 4 years ago

Any updates on this issue?

gdh1995 commented 4 years ago

PDF plugin is still rejecting all extensions on Chrome/Firefox. So a user may have to use a 3rd-party PDF extension to hook all .pdf pages.

Here's an example: use my customized version of Vimium - Vimium C (Git repo: https://github.com/gdh1995/vimium-c) - and my customized version of PDF Viewer (built from PDF.js)

jjc224 commented 2 years ago

Experiencing this issue in 2022. Quite annoying not being able to navigate within or away from PDFs. I understand that interaction with the PDF via a plugin is not feasible; however, it's pretty clear this is a hindrance to many users (including myself), and it would be great if it was addressed. As @etremel said, a single PDF tab will break tab switching such that you have to use the mouse to resolve it (e.g., by clicking another tab). I encounter this issue a lot during general browsing. This interrupts a typical Vimium workflow and goes against Vim(ium) philosophy imo.

This has been known/discussed since 2014 (issue). Any updates on this?