gdh1995 / vimium-c

A keyboard shortcut browser extension for keyboard-based navigation and tab operations with an advanced omnibar
https://chrome.google.com/webstore/detail/vimium-c/hfjbmagddngcpeloejdejnfgbamkjaeg
Other
3.17k stars 253 forks source link

Unable to search selected text in search engine #1133

Closed chjayakrishnajk closed 1 week ago

chjayakrishnajk commented 1 month ago

Describe the bug I was trying to select text using LinkHints.activateSelect and then search using autoOpen, but it is not working I have to press 'enter' in order to copy it and then use autoOpen to search it in search engine in new tab

To Reproduce

map sg autoOpen keyword="google" map yv LinkHints.activateSelect

Steps to reproduce the behavior:

https://github.com/gdh1995/vimium-c/assets/69712032/1c372a60-c31e-4970-8d32-eb3b87e08e72

Go to any website and press 'yv' to select text and press the key according to the hints and then press sg it won't work, now try to press 'enter', this copies the text and when you press 'yv' again now it searches

Browser, OS and Vimium C versions

chjayakrishnajk commented 1 month ago

When I click yv and select a text, it is in visual mode, so the 'sg' is not working. When I press 'esc' and then press sg it is searching, because it quit visual mode. Can't I search in the visual mode

gdh1995 commented 1 month ago

In Vimium C v1.99, You may use P to search selected word in a new tab when in visual mode.

And in Vimium C v2, it will be p - no shift needed by default.

You may write such a mapping to adjust p's behavior:

map v enterVisualMode reuse="new-fg" keyword="google"
chjayakrishnajk commented 1 week ago

Thanks, thats working