This Visual Studio Code extension, Split with Copilot, helps developers automatically split large files containing multiple class definitions into separate files, one for each class. Using GitHub Copilot, this extension parses the file to detect class definitions and generates individual files for each class.
Features
Class Detection: Automatically detects class definitions for multiple languages (e.g., Python, JavaScript, Java, TypeScript, C++).
Automatic File Generation: Splits the original file and creates a separate file for each detected class.
Language Support: Supports common programming languages, including Python, JavaScript, Java, TypeScript, and C++.
Unique Filenames: Ensures unique filenames when creating new files to avoid overwriting existing files.
Easy to Use: Simply select the file, run the command, and the extension handles the rest.
Installation
Open Visual Studio Code.
Go to the Extensions pane (Ctrl + Shift + X).
Search for "Split with Copilot" and click Install.
Alternatively, you can install directly from the command line with: