philc / vimium

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

how to search for an exact word? #3632

Open awaken233 opened 4 years ago

awaken233 commented 4 years ago

Describe e.g. I would like to search for an exact word say open but I do not want to find opens or opened.

To Reproduce Steps to reproduce the behavior:

  1. Go to URL 'https://github.com/philc/vimium/wiki/Tips-and-Tricks'

Here's what I tried. I didn't get what I wanted

gdh1995 commented 4 years ago

For open\b\r, Vimium will use it to search in the whole text to get a list of matched words, which is ["open"] in this case, and then it execute window.find("open", ...) to tell your browser to search for it - this is why opens will also be matched.

Currently there's no code in Vimium to do further checks to exclude unexpected matches like opens.

I have a customized version of Vimium, named Vimium C, and it does more post-find checks (to try its best, although still might fail) to let the finding result match your regexp.

alimertcakar commented 4 years ago

Why not search "open "? (open with a space following)