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

[FR] "Jump To" Vim Option #218

Open
julroger2013 opened this issue Jun 8, 2024 · 3 comments
Open

[FR] "Jump To" Vim Option #218

julroger2013 opened this issue Jun 8, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@julroger2013
Copy link

Describe your request

Thanks for making this excellent plugin.

I'm enjoying the Vim Mode very much for navigating my PDFs. It gets me very close to having a totally mouseless workflow on my PDFs.

The option of searching for a word and then selecting it to enter visual mode is helpful. However, I'm wondering if you could implement a "Jump To" shortcut that would allow leaping to any visible word by typing in a two-character combo marking each word based on Regex.

There's a plugin that implements this in Obsidian's main edit - Jump To Link - and it's a nice way to instantly jump to a particular word, even if that same word is present in other spots on the page. I think I similar shortcut would be valuable for PDF++. One shortcut to cause the two-character combinations to appear on-screen, and then typing in the two characters to leap to that spot. I included a screenshot below to show what I mean.

image

Finally, would it be possible to make it so that text selection mode in Vim can move more than one character at a time? It would be great to select text word by word, although I wonder if that would be more difficult to implement in a PDF than in a text editor ...

Thanks again for all of this!

@julroger2013 julroger2013 added the enhancement New feature or request label Jun 8, 2024
@RyotaUshio
Copy link
Owner

RyotaUshio commented Jun 8, 2024

Thanks, I'm glad you're enjoying the vim mode!

Jump To

I've already implemented something similar for links and highlights as "hint mode".

From the PDF++ settings:
image

Example:

Screen.Recording.2024-06-08.at.19.14.24.mov

So do you want the same functionality to also work for every word, not limited to links and annotations?

would it be possible to make it so that text selection mode in Vim can move more than one character at a time? It would be great to select text word by word

Word-level motions (w/e/b) are already supported as explained in the setting:

image

You can also combine numbers with these motions for modify the selection more efficiently, like 5j, 3e

@julroger2013
Copy link
Author

Oh yup, jumping a word at a time works just fine. I just didn't know the hotkey for it.

Yes, I think the Jump to Any word function would be helpful for this!

@julroger2013
Copy link
Author

Sorry, an additional thought. Of the two options presented by the "Jump to Link" plugin, I think the Lightspeed option is the better of the two.

The "Jump to Anywhere" feature kicks in for any word of 3 characters or greater, which generates lots of visual clutter.

Lightspeed mode, by contrast, allows you to type the first two letters of the desired word before applying visual tags to only those words that begin with those two letters. This generates far fewer two-key combinations to choose among, which is more streamlined in my view.

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

No branches or pull requests

2 participants