CP Supports
November 29, 2025 · View on GitHub
A VSCode extension that provides support tools for competitive programming.
Features
Open CP Files
Right-click on a folder in the Explorer to open CP project files in a split editor layout.
- Open CP Files (
cp-supports.openCPFiles): Openssrc/main.cpp,test/sample-1.in, andtest/sample-1.outin a predefined layout- Left half:
main.cpp - Right half top:
sample-1.in - Right half bottom:
sample-1.out
- Left half:
Create Test Cases
Right-click on the test folder to create new test case files.
- Create Test Cases (
cp-supports.createTestCases): Creates and opens test case files- Prompts for a test case number
- Creates
sample-{N}.inandsample-{N}.outif they don't exist - Opens the
.infile in the second editor column - Opens the
.outfile in the third editor column
Open Test Case
Opens test input/output files in a split editor layout for easy comparison.
- Open First Test Case (
cp-supports.openCaseFirst): Openstest/sample-1.inandtest/sample-1.outfrom the parent directory of the current file. - Open Test Case (
cp-supports.openCase): Lists all available test cases (test/sample-*.in) and lets you select which one to open.
Both commands open:
- The
.infile in the second editor column - The
.outfile in the third editor column
Expected Directory Structure
project/
├── src/
│ └── main.cpp (your active file)
└── test/
├── sample-1.in
├── sample-1.out
├── sample-2.in
├── sample-2.out
└── ...
Build
npm install
npm run compile
Installation
From VSIX file
-
Build the VSIX package:
npm install npm run package -
Install from command line:
code --install-extension cp-supports-*.vsix
For Development
- Open this folder in VSCode
- Press
F5to launch the Extension Development Host - Use context menu commands:
- Right-click on any folder: "Open CP Files"
- Right-click on
testfolder: "Create Test Cases"
- Or use Command Palette (
Cmd+Shift+P/Ctrl+Shift+P) and search for:- "Open First Test Case"
- "Open Test Case"
License
MIT