The QuickSwitch: Test-Source-Config extension for Visual Studio Code allows you to quickly switch between implementation, test, and configuration files in your project. This extension is designed to streamline your workflow by providing easy navigation between related files.
- Switch between Config, Implementation, and Test files using dedicated commands
- Use the switchTarget command to select the target file type
- Cycle through Implementation, Config, and Test files with a single command
You can use the following commands to switch between related files:
- Go to Implementation: QuickSwitch: Go to implementation
- Go to Test: QuickSwitch: Go to test
- Go to Config: QuickSwitch: Go to config
These commands can be accessed via the Command Palette (Ctrl+Shift+P or Cmd+Shift+P on Mac).
The switchTarget command allows you to select the target file type from a quick pick menu:
- Switch Target: QuickSwitch: Select target...
This command can be accessed via the Command Palette (Ctrl+Shift+P or Cmd+Shift+P on Mac).
The cycleTarget command allows you to cycle through Implementation, Config, and Test files with a single command:
- Cycle Target : QuickSwitch: Cycle...
This command is best used with a shortcut for quick access. You can set up a custom keybinding in your keybindings.json file.
For the extension to work correctly, the following naming conventions must be applied to your files:
- Implementation files:
src/*.ts
- Test files:
test/*.spec.ts
- Config files:
res/*Config.ts
- Config test files:
test/res/*Config.spec.ts
- Open Visual Studio Code.
- Go to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the window or by pressing Ctrl+Shift+X.
- Search for QuickSwitch: Test-Source-Config.
- Click the Install button.
- Open a TypeScript file in your project.
- Use the Command Palette (Ctrl+Shift+P or Cmd+Shift+P on Mac) to access the QuickSwitch commands.
- Select the desired command to switch between related files.
Contributions are welcome! Please feel free to submit a pull request or open an issue on the GitHub repository.
This project is licensed under the MIT License. See the LICENSE file for details.