Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Toggle SpecNew to Visual Studio Code? Get it now.
Toggle Spec

Toggle Spec

Andrei Nemes

|
329 installs
| (1) | Free
Toggle between your source and spec file
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Toggle Spec

Jump to the spec/source complement of the current file.

Toggle Spec will search all root-level directories within your project, ignoring node_modules and bower_components. Once it found a match, it will learn to prioritize its directory.

Usage

Manual

Press Ctrl+Shift+P (Cmd+Shift+P on a Mac) to open the Command Pallete and type Toggle Spec.

Keyboard Shortcut

Bind extension.toggleSpec to a keybinding.

Configuration

Exclude Directories

To add directories to the exclude list, use the following configuration key:

"toggleSpec.exclude": [
  "foo",
  "bar"
]

Only directories at the root of your project will be taken into account.

Limitations

Toggle Spec does not currently work with root-level files within your project.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft