1995eaton / chromium-vim

Vim bindings for Google Chrome.
https://chrome.google.com/webstore/detail/cvim/ihlenndgcmojhcghmfjfneahoeklbjjh
MIT License
2.25k stars 326 forks source link

Idea: make a web history search just for the current website #755

Open njoppi2 opened 2 years ago

njoppi2 commented 2 years ago

I use notion.so a lot, and I'm constantly changing pages between, for example: notion.so/Professional, notion.so/Personal, notion.so/Objectives, notion.so/Exercises. It would be really cool if I could make a search for previously accessed notion pages, so that if I search for "personal", it takes me to notion.so/Personal.

b-coimbra commented 2 years ago

Maybe we could reuse the existing history search command ("I") and filter out the results by the active tab's domain (notion.so in this case)?

I might implement this in my own vimch fork, I'm just not sure if I should make this just a command that can be bound to any key, or a setting toggle such as set historybydomain, but I think the former makes more sense.

b-coimbra commented 2 years ago

Alternatively you could also create a site-specific configuration and filter the history results by yourself:

site '*://notion.so/*.' {
  filterHistoryByDomain() -> {{
    "" ...
  }}
  map I :call filterHistoryByDomain<CR>
}