vimium icon indicating copy to clipboard operation
vimium copied to clipboard

How can I search the selected text with my custom search engines with a single key?

Open ffplayer opened this issue 8 years ago • 7 comments

When I selected some text and want to quickly search this text with specific custom search engine just with pressing s key.

Is it possible to do this?

ffplayer avatar Jul 14 '17 04:07 ffplayer

Configure your custom search engine in the advanced section of Vimium options. Then p/P. (p is to paste the current string in clipboard to do a navigation if is an URL, otherwise do a search using the configured search engine. Uppercase P is to paste in a new tab)

Similar with selecting text via Visual Mode. Instead of y to copy the selection, p/P to directly search it using the configured search engine.

innaterebel avatar Jul 15 '17 01:07 innaterebel

@innaterebel thanks for your reply! This two step method seems not perfectly to do "one single key searching". I have a habit from opera of searching selected text with different single key with appropriate search engine. Such as I select "github" highlighted ,and then I can press g search it with google or press w search with wikipedia. Maybe it not a general demand :P

ffplayer avatar Jul 17 '17 03:07 ffplayer

My custom Vimium allows this: it has a special command "autoOpen" which reads selected text and open or search it. The project is https://github.com/gdh1995/vimium-c , and Chrome WebStore link is https://chrome.google.com/webstore/detail/vimium-c/hfjbmagddngcpeloejdejnfgbamkjaeg/

For example, my command mappings are:

map Cd autoOpen keyword="dict"
map Cg autoOpen keyword="google"
map Cb autoOpen keyword="baidu"
# "dict" is the name of Bing Dict search engine (declared in "Custom search engines")
# "baidu" is another search engine mainly for Chinese users

gdh1995 avatar Jul 18 '17 14:07 gdh1995

My custom Vimium allows this: it has a special command "autoOpen" which reads selected text and open or search it. The project is https://github.com/gdh1995/vimium-plus , and Chrome WebStore link is https://chrome.google.com/webstore/detail/vimium%2B%2B/hfjbmagddngcpeloejdejnfgbamkjaeg/

For example, my command mappings are:

map Cd autoOpen keyword="dict"
map Cg autoOpen keyword="google"
map Cb autoOpen keyword="baidu"
# "dict" is the name of Bing Dict search engine (declared in "Custom search engines")
# "baidu" is another search engine mainly for Chinese users

wonderful !! I have found this func so long, now I set up "s" key for selected text search in Google: map s autoOpen keyword="google"

Unfortunately, few people know about your project

zz5678 avatar Sep 21 '20 19:09 zz5678

btw, feel great setting z and c keys as tabs changer-key, x and X as close and re-open keys by default with vimium-c

map z previousTab
map c nextTab

zz5678 avatar Dec 06 '20 10:12 zz5678

My custom Vimium allows this: it has a special command "autoOpen" which reads selected text and open or search it. The project is https://github.com/gdh1995/vimium-c , and Chrome WebStore link is https://chrome.google.com/webstore/detail/vimium-c/hfjbmagddngcpeloejdejnfgbamkjaeg/

For example, my command mappings are:

map Cd autoOpen keyword="dict"
map Cg autoOpen keyword="google"
map Cb autoOpen keyword="baidu"
# "dict" is the name of Bing Dict search engine (declared in "Custom search engines")
# "baidu" is another search engine mainly for Chinese users

map autoOpen keyword="google" map autoOpen keyword="dict" above works for me on mac , alternatively i can also press v+p

Bilal-star1 avatar Aug 06 '24 19:08 Bilal-star1

map y autoOpen keyword="youtube" Can somebody help why it does not work with "youtube"

mehrankhanweb avatar Sep 06 '24 10:09 mehrankhanweb

map y autoOpen keyword="youtube" 有人能帮忙解释一下为什么它不适用于“youtube”

@mehrankhanweb The default keyword is y or yt. image

Mabciyptyl avatar Oct 20 '24 12:10 Mabciyptyl