Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Open In WebNew to Visual Studio Code? Get it now.
Open In Web

Open In Web

VCaveman

|
16,931 installs
| (1) | Free
Open default browser and go to specified url containing selected text.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Open In Web

This extension allows you to open the default browser and go to specified URL pattern, in which will be inserted selected text.

Using

There're 3 ways to use extension:

By context menu:

  • Select some text in editor.
  • Right-click on selection to show context menu.
  • Select "Open In Web" option to open Google search for selection.

Context menu usage

By command palette:

  • Select some text in editor.
  • Open command palette and type "Open In Web".
  • Select "Open In Web" command for quick open default url or "Open In Web: Choose url" command for choosing url from Web Action List.

Imgur

Imgur

By keyboard shortcut:

  • Define a keyboard shortcut for openInWeb.openInWeb command or openInWeb.openInWebActionList command.
  • Select some text in editor.
  • Press shortcut combination to open wanted url with selection.

Imgur

Specifying url template

You can specify web sites which can be opened by extension.

There're openInWeb.defaultAction property for default action template and openInWeb.actionList for Web Action List templates.

If openInWeb.defaultAction property is empty, Web Action List will be opened instead of default url opening.

Url template can contain %SELECTION% and %LANG% keywords. %SELECTION% will be replaced by selected text and %LANG% will be replaced by current file language (html, javascript, xml...).

For example, default settings of extension:

{
    "openInWeb.actionList": [
        {
            "url": "https://www.google.com/search?q=%SELECTION%",
            "label": "Google Search"
        },
        {
            "url": "https://yandex.ru/search/?text=%SELECTION%",
            "label": "Yandex Search"
        },
        {
            "url": "https://duckduckgo.com/?q=%SELECTION%",
            "label": "DuckDuckGo Search"
        },
        {
            "url": "https://www.google.com/search?q=%LANG%%20%SELECTION%",
            "label": "Google Search (+language)"
        },
        {
            "url": "https://yandex.ru/search/?text=%LANG%%20%SELECTION%",
            "label": "Yandex Search (+language)"
        },
        {
            "url": "https://duckduckgo.com/?q=%LANG%%20%SELECTION%",
            "label": "DuckDuckGo Search (+language)"
        },
        {
            "url": "https://translate.google.com/#auto/en/%SELECTION%",
            "label": "Google Translator (ENG)"
        },
        {
            "url": "https://translate.yandex.ru/?text=%SELECTION%",
            "label": "Yandex Translator (AUTO)"
        }
    ],

    "openInWeb.defaultAction": "https://www.google.com/search?q=%SELECTION%",
}

Release Notes

1.0.1 (03.07.2017)

  • Fixed vscode-nls dependancy.

1.0.0 (03.07.2017)

  • Initial release.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft