Open With SoftOpen files from VS Code with your own external applications or terminal editors.
It is especially useful when you work in WSL or Remote-SSH and still want to open selected files with tools outside VS Code. Features
Quick StartInstall the extension, open VS Code settings as JSON, and add at least one application:
Then right-click a matching file and choose:
You can also press Common ExamplesOpen Markdown with Windows Typora from WSLWhen VS Code is connected to WSL, the extension can convert a Linux path such as:
to a Windows-accessible path such as:
Example:
Open Remote-SSH Files with Local AppsRemote-SSH files do not have a local path that desktop applications can open directly. For external applications, Example:
When the local temporary file is saved, the extension asks:
Choose Edit with Vim in a TerminalTerminal editors need an interactive terminal. Set
When you right-click
By default, a new terminal is created for each run. This avoids sending a new command into an existing terminal that may already be running Vim or another TUI application. If you explicitly want to reuse a terminal:
Configuration
|
| Field | Type | Required | Description |
|---|---|---|---|
menu |
string | yes | Label shown in the quick pick menu. |
exe |
string | yes | Executable path or command name. |
match |
string or string[] | no | Glob pattern list. If omitted, the app matches all files. |
mode |
"external" or "terminal" |
no | Defaults toexternal. |
args |
string[] | no | Custom arguments. If omitted, the selected file path is passed automatically. |
cwd |
string | no | Working directory. Supports variables. |
terminalName |
string | no | Terminal tab name for terminal mode. Supports variables. |
reuseTerminal |
boolean | no | Reuse terminal with the same name. Defaults tofalse. |
Match Patterns
match uses glob patterns:
{
"match": ["*.md", "*.markdown", "README*", "docs/**/*.md"]
}
Common patterns:
| Pattern | Meaning |
|---|---|
*.md |
Match Markdown files by file name. |
*.{md,markdown} |
Match multiple extensions. |
README* |
MatchREADME, README.md, README.zh.md, and similar names. |
**/*.log |
Match.log files anywhere in the workspace. |
docs/**/*.md |
Match Markdown files underdocs. |
* |
Match all file names. |
Patterns without / match only the file name. Patterns with / match the workspace-relative path. Matching is case-insensitive.
Custom Arguments
If an application needs special arguments, configure args:
{
"openWithSoft.apps": [
{
"menu": "Open with Custom Editor",
"exe": "C:\\Tools\\Editor\\editor.exe",
"match": "*.md",
"args": ["--reuse-window", "${file}"]
}
]
}
Supported variables:
| Variable | Meaning | |
|---|---|---|
${file} |
Host-accessible file path. For Remote-SSH external mode, this is the local temporary copy path. | |
${localFile} |
Same as ${file}. |
|
${remoteFile} |
Original VS Code resource path. | |
${fileBasename} |
File name only. | |
$FileName |
Alias for ${fileBasename} in terminalName. |
|
${fileDirname} |
Directory of the default file argument. | |
${workspaceFolder} |
Workspace folder path, when available. |
In external mode, the default file argument is ${file}.
In terminal mode, the default file argument is ${remoteFile} so CLI editors receive the path that exists inside the terminal environment.
Why There Is One Context Menu Entry
VS Code extensions published to the Marketplace cannot dynamically create new context menu entries from user settings. Menu entries must be declared statically in the extension manifest.
For that reason, this extension uses one stable context menu entry:
Open With Soft...
The configured applications are shown in the quick pick menu after that.
Troubleshooting
The Context Menu Does Not Appear
- Right-click an actual file in the Explorer or editor.
- Try Command Palette ->
Open With Soft.... - Make sure
openWithSoft.appscontains at least one configured application. - Make sure the selected file matches the app's
matchpattern.
Typora or Another Windows App Cannot Open a WSL File
- Confirm the file path exists under
\\wsl.localhost\<DistroName>\.... - Confirm the Windows application can open that UNC path directly.
- If the app does not support UNC paths, use Remote-SSH temporary-copy behavior or a local synced folder instead.
Remote-SSH Changes Are Not Synced
- External applications edit a local temporary copy first.
- Save the file in the external application.
- Choose
Yeswhen the extension asks whether to replace the remote file. - If you chose
Stop Watching, runOpen With Soft...again to create a new watched temporary copy.
Vim Opens in the Wrong Environment
Use mode: "terminal". Terminal mode sends ${remoteFile} by default, which is the path visible inside the terminal environment.
Author
yacper yacper@gmail.com
License
MIT