/code-bing

Visual Studio Code Extension to search for selected text in the internet.

Primary LanguageTypeScript

CodeBing

Join the chat at https://gitter.im/SrTobi/code-bing

A Visual Studio Code Extension to search selected text (or anything) with your favorite search engine.

How it works

Press ctrl+alt+f or use the Bing command to search the selected text. This will bring up an input box containing your selection (by default.)

Preview

Specify the search engine you want to use with fully customizable shortcuts in the search box.

Shortcut preview

Set your favorite search engine

You can change the search engine in your settings by setting the codebing.defaultProvider option to one of your search engine shortcuts or to a new query string.

	"codebing.defaultProvider": "b"

Install CodeBing

Use VS Code's extension installer by pressing F1 and searching for Extensions: Install Extensions. In the next input box enter code-bing and wait for the installer to find CodeBing. Hit Enter to install.

Installation

Other Settings

You can define the list of search providers and their shortcuts in the codebing.searchProviders option. Note that setting this option will overwrite these defaults.

 "codebing.searchProviders": {
	"b": "https://www.bing.com/search?q={query}",
	"g": "https://www.google.com/search?q={query}",
	"yh": "https://search.yahoo.com/search?p={query}",
	"ddg": "https://duckduckgo.com/?q={query}",
	"wiki": "https://en.wikipedia.org/wiki/{query}",
	"yt": "https://www.youtube.com/results?search_query={query}",
	"twit": "https://twitter.com/search?q={query}",
	"gh": "https://github.com/search?utf8=✓&q={query}",
	"so": "https://stackoverflow.com/search?q={query}"
}

If you do not want to use shortcuts, set codebing.useDefaultProviderOnly to true:

"codebing.useDefaultProviderOnly": true

Set codebing.noInputBoxIfTextSelected to true to skip input when searching selection:

"codebing.noInputBoxIfTextSelected": true

Contributing

Feel free to contribute to this extension. Please read the CONTRIBUTING.md. The following people contributed to this extension: