https://github.com/typed-sigterm/oi-runner-2
专为 OIer 和 ACMer 设计的 VS Code 插件,用于运行单文件程序/VS Code extension designed for OIer and ACMer, used to run single file program
https://github.com/typed-sigterm/oi-runner-2
acm acm-icpc debugger icpc oi vscode-extension
Last synced: 4 months ago
JSON representation
专为 OIer 和 ACMer 设计的 VS Code 插件,用于运行单文件程序/VS Code extension designed for OIer and ACMer, used to run single file program
- Host: GitHub
- URL: https://github.com/typed-sigterm/oi-runner-2
- Owner: typed-sigterm
- License: mit
- Created: 2024-06-21T06:41:24.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-01T11:47:50.000Z (4 months ago)
- Last Synced: 2025-03-01T12:26:09.353Z (4 months ago)
- Topics: acm, acm-icpc, debugger, icpc, oi, vscode-extension
- Language: TypeScript
- Homepage: https://oi-runner-2.by-ts.top
- Size: 2.15 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# OI Runner++
> [!TIP]
>
> Read more 👉 [English](https://oi-runner-2.by-ts.top/en/)|[简体中文](https://oi-runner-2.by-ts.top/zh-cn/)VS Code extension designed for OIer and ACMer, for running single file program.

## Configuration
### `oi-runner-2.tasks`
Defines the tasks available in the run panel and their corresponding compilation and execution commands.
Format:
```jsonc
{
"oi-runner-2.tasks": {
"C++": { // Task label
"compile": [ // Compilation command and arguments
"g++",
["${file}", "-o${fileNoExt}", "-std=c++14", "-O2"] // The use of ${} is explained below
],
"execute": [ // Execution command, required
"${fileNoExt}${execExt}",
[]
]
},
"Python": {
// The compilation command can be empty; the compile button will not be displayed when this task is selected
"execute": [
"python",
["${file}"]
]
}
// ...
}
}
```There are special strings in the commands and arguments that will be replaced with actual information when executed:
| Special String | Replaced With |
| --- | --- |
| `${file}` | The absolute path of the source file |
| `${fileNoExt}` | The absolute path of the source file without the extension |
| `${execExt}` | The extension of the executable file, `.exe` on Windows, an empty string on other systems |The working directory is the opened folder.
### `oi-runner-2.defaultTask`
Defines the default task selected in the run panel when a file is opened.
Format:
```jsonc
{
"oi-runner-2.tasks": {
"C++": { /* ... */ },
"Python": { /* ... */ }
},
"oi-runner-2.defaultTask": {
".py": "Python" // Files with the .py extension default to Python
// If a file does not match any extension here, the run panel won't switch to the file
}
}
```### `oi-runner-2.addToRunMenu`
Whether to add OI Runner++ to the editor title menu.
If disabled, you need to press Ctrl + Shift + P and search for `Launch OI Runner++` to open the run panel.
Format: `true` (default) or `false`.
## Credits
This project is deeply inspired by [OI Runner](https://github.com/CmdBlockZQG/oi-runner). Thanks to [@CmdBlockZQG](https://github.com/CmdBlockZQG) and other contributors of OI Runner.