philc / vimium

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

Ideas for searching within the visible page? #3179

Open Madd0g opened 5 years ago

Madd0g commented 5 years ago

Whenever I successfully yank a bunch of text without touching my mouse, I get a warm feeling inside, but unfortunately I'm new with vim and the only way I know of doing it is not great.

What's the best way of going from nothing to yanking a specific phrase from the page? The only thing I became sort of proficient with is slash search -> visual selection -> yank.

I'm staring directly at some text on the page, start searching for it with /somete but then the screen runs away to some other match at the top and I lose focus. I think if there was a way of using slash searches on the visible viewport only, I'd use that as my default.

Does anyone have better workflows?

lydell commented 5 years ago

Here's a (not implemented) idea you might be interested in: #2427

smblott-github commented 5 years ago

When you use /, Vimium uses window.find(), which begins the search with the current selection (or the top of the page).

When you use v and there is no existing selection, Vimium tries to select the first visible character on the page.

The solution to your problem is... v, /something, which should focus the first visible "something".

alon-to commented 4 years ago

The solution to your problem is... v, /something, which should focus the first visible "something".

I share @Madd0g's perfectly described challenge of yanking text without a mouse using Vimium. The shortcut combination described above seems to lessen the pain and I'm looking forward to experimenting with it. With that said the feature request in #2427 would be absolutely amazing -- I just included a screenshot over on that bug that shows how that's implemented in a competing extension. I'd be so happy to see it come to Vimium as well!