AvinZarlez / processing-vscode

A Visual Studio Code extension for the programming language Processing
https://marketplace.visualstudio.com/items?itemName=Tobiah.language-pde
MIT License
177 stars 25 forks source link

DuckDuckGo instead of Google Search + autoredirect #80

Closed atnbueno closed 4 years ago

atnbueno commented 4 years ago

Replace the original Google Search with DuckDuckGo, a privacy-oriented search engine. Aditionally, it automatically redirects to the Processing/p5js site (instead of showing the search results).

AvinZarlez commented 4 years ago

I appreciate having more options!

Though I have some comments:

atnbueno commented 4 years ago

The !processing prefix is 100% equivalent to site:processing.org. If necessary, we could add inurl:reference to ensure it doesn't go anywhere else (btw, this also happens with the current Google search).

On the other hand, !p5 is NOT equivalent to site:p5js.org because that site's search is hash-based. In other words, in DuckDuckGo !p5 works and site:p5js.org doesn't.

The %5C is needed because is what makes the automatic redirection (not necessary in !p5 because, again, it's hash-based). If you omit it you see the search results.

You can try it manually by going to https://duckduckgo.com and searching for: 1) !processing frameRate (a more strict alternative would be !processing inurl:reference frameRate which is equivalent to https://duckduckgo.com/?q=site%3Aprocessing.org+inurl%3Areference+frameRate) 2) !processing \frameRate (stricter alternative: !processing \inurl:reference frameRate or https://duckduckgo.com/?q=site%3Aprocessing.org+%5Cinurl%3Areference+frameRate) 3) !p5 frameRate (no alternative)

atnbueno commented 4 years ago

P.S. On search results v automatic redirect: I prefer the redirect because it's more similar to the behavior of the original IDE P.P.S. Expanded the manual examples above

AvinZarlez commented 4 years ago

Added as a setting in 1.4.4