Open files or directories in the system's default terminal directly from the Visual Studio Code File Explorer.
Unlike the built-in VS Code command, this extension supports Smart Execution—allowing you to run scripts and executables immediately upon opening.
Features
Context Menu Integration: Right-click on any file or folder in the Explorer and select Open in External Terminal.
Smart Directory Opening:
Right-click a folder: Terminal opens in that folder.
Right-click a non-executable file (e.g., .txt, .json): Terminal opens in that file's directory.
Smart Execution:
Right-click a configured script (e.g., .py, .js, .bat, .sh): The terminal opens and automatically runs the file.
Interpreter Support: Map extensions to specific binaries (e.g., run .ts with ts-node or .py with python3).
Key Bind: A hotkey opens the current file. If defined avobe, it allows you to execute immediately without mouse manipulations.
Windows Terminal Support: Seamless integration with wt.exe.
Cross-Platform: Works on Windows, macOS, and Linux.
Usage
Right-click on a file or folder in the VS Code Explorer sidebar.
Select Open in External Terminal.
Tip: If you select a file defined in the settings (like .py), it will execute. If you want to just open the folder containing that file without running it, use the standard VS Code "Open in Integrated Terminal" or modify the extension settings.
Extension Settings
This extension contributes the following settings to the settings.json:
1. Terminal Configuration
open-in-external-terminal.preferredTerminal: The executable path or command for the terminal.
Windows Default: cmd.exe (Detects wt.exe automatically if path includes it).
Mac Default: Terminal.app.
Linux Default: xterm.
open-in-external-terminal.additionalArgs: An array of arguments to pass to the terminal executable (e.g., ["-p", "Ubuntu"] for Windows Terminal profiles).
2. Execution Logic
open-in-external-terminal.interpreterMappings: (New) Map file extensions to specific interpreters. This is useful for scripts that cannot execute natively.