Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Open Selection In WebsitesNew to Visual Studio Code? Get it now.
Open Selection In Websites

Open Selection In Websites

voipke

|
1 install
| (0) | Free
Open selected text in configured websites with a right-click menu
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Open Selection In

A VS Code extension that allows you to open selected text in configured websites via right-click menu.

Features

  • Quick Access: Select any text in the editor, right-click to open in your configured websites
  • Customizable: Add, remove, or edit menu items via the configuration UI
  • Multiple Sites: Configure multiple search sites (npm, GitHub, Stack Overflow, etc.)
  • Bilingual: Supports English and Chinese (Simplified)
  • Flexible Variables: Use ${encoded} for URL-encoded text or ${selectedText} for raw text

Usage

  1. Select any text in your code editor
  2. Right-click and choose "Open Selection In..." (or "在...中打开" in Chinese)
  3. Select a website from the quick pick menu
  4. The selected text will be searched on the chosen website

Keyboard Shortcut

  • Ctrl+Shift+O (Windows/Linux)
  • Cmd+Shift+O (macOS)

Configuration

Via Settings UI

  1. Press Ctrl+Shift+P (or Cmd+Shift+P on macOS)
  2. Type "Configure Menu Items" and press Enter
  3. Add, edit, or delete menu items
  4. Click Save to apply

Via settings.json

{
  "openSelectionIn.menuItems": [
    { "label": "npmjs", "url": "https://www.npmjs.com/search?q=${encoded}" },
    { "label": "GitHub", "url": "https://github.com/search?q=${encoded}" },
    { "label": "Stack Overflow", "url": "https://stackoverflow.com/search?q=${encoded}" }
  ],
  "openSelectionIn.language": "en"
}

Available Variables

  • ${encoded} - URL-encoded selected text
  • ${selectedText} - Raw selected text

Language Settings

Set openSelectionIn.language to:

  • en - English
  • zh-cn - Chinese (Simplified)

Default Menu Items

Label URL
npmjs https://www.npmjs.com/search?q=${encoded}
GitHub https://github.com/search?q=${encoded}
Stack Overflow https://stackoverflow.com/search?q=${encoded}

License

MIT

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