Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search specific websites directly using website name prefixes #55

Closed
ipod825 opened this issue Jun 1, 2020 · 9 comments
Closed

Search specific websites directly using website name prefixes #55

ipod825 opened this issue Jun 1, 2020 · 9 comments
Labels
enhancement New feature or request mode-explore Issues related to explore mode

Comments

@ipod825
Copy link

ipod825 commented Jun 1, 2020

Reference:
https://www.techrepublic.com/article/pro-tip-add-custom-search-engines-in-chrome-for-more-efficient-searching/

@Jelmerro Jelmerro added enhancement New feature or request question Further information is requested labels Jun 1, 2020
@Jelmerro
Copy link
Owner

Jelmerro commented Jun 1, 2020

Could you elaborate on this feature request in a bit more detail? There already is a setting for changing the search engine simply named "search". If you want to switch between two or presumably more, I would recommend to add a custom command or map a new keybinding.

@ipod825
Copy link
Author

ipod825 commented Jun 1, 2020

It let's you to type say github on the addressbar, and then pressing tab.
You then enter what ever you want to search in github. Pressing enter, it will directs to the search page with github searching result of your query. Of course you need some kind of configuration to map github to the search query url of github.

The pro of this is that you don't need to load the github home page and type your query there, saving one page loading time. Also, you don't lost your current context when you type the query.

Pressing tab isn't really necessary to be implemented. In qutebrowser, it just requires you type github followed by a space and a query.

@Jelmerro
Copy link
Owner

Jelmerro commented Jun 1, 2020

I also don't see the added value of these domain searches over duckduckgo bangs (such as appending !github) or worst case appending the search with site:github.com. Although if more people think that such a search prefix would improve Vieb, feel free to make a PR to implement this, as I probably won't pick this up myself any time soon.

When adding this, please do not make it automatically activate, because it can prevent people from searching for certain things. For example, it would not be an option to search for github guides on duck, without being redirected to search for github repositories named "guides".

@Jelmerro Jelmerro added mode-explore Issues related to explore mode and removed question Further information is requested labels Jun 1, 2020
@Jelmerro Jelmerro changed the title [feature-request] Search Engines Search specific websites directly using website name prefixes Jun 1, 2020
@Jelmerro Jelmerro added the help wanted Help wanted with this issue, so PRs are encouraged! label Jun 2, 2020
@InconsolableCellist
Copy link
Contributor

InconsolableCellist commented Dec 15, 2020

There are a few big benefits over DDG bangs: you can set your search engine to something other than DDG but still have these searches work; you can customize them; and your search isn't going through a middleman when that's not necessary.

I personally greatly prefer Startpage to DDG (and was going to try and figure out how to change the default search engine to reflect this (edit: easily, with :set search=<url> and %s).

DDG also doesn't use the same bang keywords as you might want to use, and might be missing sites.

@Jelmerro
Copy link
Owner

You can change Vieb's search engine with the search option, see :h search for details.

I agree that there are benefits to implementing this compared to using DDG, most of which you mention in your comment. It's just that I won't use this feature myself, and as such probably won't spend time on implementing this in the near future (hence the "help wanted" label on this issue).

@InconsolableCellist
Copy link
Contributor

@Jelmerro Github doesn't seem to have a private chat option. I'm taking a crack at implementing this but I'm wondering if you can tell me the proper way to log trace statements in Vieb? To a log or STDOUT/STDERR. console.log() doesn't seem to do it when I run with npm

@Jelmerro
Copy link
Owner

Jelmerro commented Dec 15, 2020

console.log works, but depending on where you log, you need to check different places. For example, the app/index.js file is running the main thread, which will log to the terminal. Most other files are part of the renderer, which will log to Vieb's internal developer tool console, which can be opened with the :intervaldevtools command, or with the --debug startup option. With the developer tools you can also add breakpoints and that kind of stuff that you might know from debugging websites with the devtools.

@InconsolableCellist
Copy link
Contributor

Excellent! Thanks. Having the console and debugging makes it so much easier.

@Jelmerro
Copy link
Owner

This has been implemented by @InconsolableCellist in #110 👍

@Jelmerro Jelmerro removed the help wanted Help wanted with this issue, so PRs are encouraged! label Feb 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request mode-explore Issues related to explore mode
Projects
None yet
Development

No branches or pull requests

3 participants