Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Send snippet to TerminalNew to Visual Studio Code? Get it now.
Send snippet to Terminal

Send snippet to Terminal

Janne Mattila

|
284 installs
| (0) | Free
Send code snippet to Terminal by automatically expanding the code block to cover the multiline command
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

VS Code Send snippet to Terminal

Send code snippet to Terminal by automatically expanding the code block to cover the multiline command.

Features

This extension expands code block automatically before sending it to Terminal. It works both with Bash and with PowerShell.

Example multiline command in Bash:

curl \
  -X GET \
  https://bing.com

Example multiline command in PowerShell:

curl `
  -X GET `
  https://bing.com

Now if you execute send-snippet-to-terminal.send-multiline in VS Code when your cursor is anywhere in those lines in your editor, then extension will automatically select the entire block and then sends it to Terminal for execution. This makes your script development much faster.

To enable this command with handy keyboard shortcut like e.g., Shift-Enter, then follow these instructions:

  1. Open Show all commands (Windows: Ctrl-shift-p or F1).
  2. Open Preferences: Open keyboard shortcuts.
  3. Find Send snippet to Terminal and set that be your preferred shortcut e.g., shift-enter.

Note: You need to then search with that shortcut to remove other shortcuts that might overlap with your selection.

Extension Settings

  • send-snippet-to-terminal.send-multiline: Send multiline command to Terminal.
  • send-snippet-to-terminal.send-clear: Send clear command to Terminal.

Release Notes

0.0.3

Add support for sending clear command to Terminal.

0.0.2

Add support for opening Terminal, if not already open.

0.0.1

Initial release

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