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.37k stars 253 forks source link

o or O option not working on Perplexity #1177

Open nitrogenxx opened 2 months ago

nitrogenxx commented 2 months ago

Steps to reproduce the behavior:

  1. go to https://www.perplexity.ai/
  2. press Esc for normal mode
  3. press o --or-- O and type the query there

it will not let you type the query instead when you press o or O it will go into insert mode while Vomnibar is still open Vomnibar is fade out ( or transparent)

same behaviour just like you open Vomnibar and click somewhere else while Vomnibar is still open.. the Vomnibar appearance will fade out ( or transparent)

gdh1995 commented 2 months ago

Well it's not a bug but a security feature of Vimium C.

The website locks keyboard focus to its "Ask anything..." input box using some naive JavaScript code, which means everytime Vomnibar want to focus the webpage grabs back focus again.

Vomnibar gets partially transparent, so that users may learn it loses focus "at once". In the below snapshot, there's a green text caret inside the red ellipse: image

I use the word security feature because in such a situation Vimium C can not make Vomnibar grab back focus again and again - otherwise a web page may run into a dead loop and then eat much CPU time and laptop power.

afilp commented 2 months ago

Is there a way to have the "o" or any other key show only the open tabs and bookmark tabs, without history?

With the top results to be the open tabs?

I am trying to use vimium-c instead of the Chrome ctrl-shift-A, but I can't because there are too many results because of the history.

Even better: Can we have some options to customze the "o" view? (what to show/how/etc.) And these options be persistent?

gdh1995 commented 2 months ago
  1. map o Vomnibar.activate mode="omni" engines="search,tab,bookmark"
  2. No Vimium C doesn't ensure this, because suggestions are sorted by their scores computed using your query words and their last-visit-time
    • but you may type :t <some-query> to limit search range into tabs temporarily
  3. You may style Vomnibar dialog by writing CSS code
nitrogenxx commented 2 months ago

Vomnibar is great.. also there is one feature which is so much essential to have.. is to search on multiple website with one query

example my_query="my query xyz"

https://github.com/search?q= $my_query https://google.com/search?q= $my_query https://perplexity.ai/search?q= $my_query https://youtube.com/results?search_query= $my_query

boooom search on multiple website in just one shot

searching same query on multiple website is so much time consuming and mind taking slow process Vomnibar deserve this feature because its so much handy when you need to research about any topic

maybe we can do it using Custom search engines in the vimium-c config.. but how ??🤔

this approach is only limited to one website we can't search on mulitple URL from single query is there any existing way to search on multiple URL with one query ??

I will really appreciate your help or any inside possible

gdh1995 commented 2 months ago

Yes Vimium C supports this, but I recommend a simpler (at least for me) way:

For example:

run <v-sia> searchInAnother##keyword=$s mask
## `GG` will auto find query words and then search in the `g` keyword
run GG sia g
## redo search in the `d` keyword
run Gd sia d

If you do want to open multiple URLs in one action, then you may add such a search engine:

multi: vimium://urls/gh|g|yt:$S

And then multi foo bar + <Enter> on Vomnibar will search in gh, g and yt custom search engines.

nitrogenxx commented 2 months ago

thankyou. this made my life so much easier and I feel more confident using Vimium now. the way you explained it with examples cleared all my doubts

however there is one more question i have.

how about using keyboard shortcut to open a URL and if that URL is already open somewhere in the tabs. then switch to that tab instead of reopening the same URL into new tab

i can think that can be done with two ways but i don't know how. example:

1st way: using keybinding like when we press alt + g c it should open https://github.com/gdh1995/vimium-c/ but when this URL is already present in some other tab then alt + g c should switch to that tab and should not open this URL again into new tab

2nd way: using Vomnibar sort the Vomnibar primarily for open tabs and secondary for history. this way when we will type vimium-c in the Vomnibar (where item should be pre-selected ) and press enter then if https://github.com/gdh1995/vimium-c/ is already present in tabs it will switch to that tab otherwise it will open that into new tab

i can only imagine this two ways but i am not sure how to achieve it practically.. i will look forward for your guidance.

this is helpful when we have many tabs open and we don't want to search it on tab list.. this way we don't have to perform if / else into our mind.. kind of cool..uh.💕

gdh1995 commented 2 months ago
  1. You may add

    # focusOrLaunch is an alias of `openUrl reuse="reuse"`
    map <a-g>c focusOrLaunch url="https://github.com/gdh1995/vimium-c/"
  2. When Vomnibar is in "omni" mode, it shows suggestions from history items, bookmarks and opened tabs, so you may press ArrowDown to select a tab suggestion: image

Or you may try the T mapping (Shift+T, Vomnibar.activateTabs) to search in only tabs.