This extension was HEAVILY inspired by this https://github.com/sporto/rails-go-to-spec-vscode.
Jump between code and test file in Rails projects. Newly created files will be populated with test boilerplate.
Enjoy!
- Ctrl + Shift + t
- Cmd + Shift + t (Mac)
Within VSCode (last tested in v1.56.1):
- Open Keyboard Shortcuts menu (
ctrl+k ctrl+s
for windows,cmd+k cmd+s
for mac) - Search for
Go to test
- Hover over this extension's shortcut (identified by
extension.goToTest
) and click on the edit icon to the left (looks like a pencil) - Press a key combination and save to overwrite the default keybinding
Alternatively,
In keybindings.json
:
[
...
{
"key": "alt+cmd+t", // Your chosen combination
"command": "extension.goToTest",
"when": "editorTextFocus"
},
...
]
Shortcuts defined here will work in-addition-to whatever keybinding is specified in the Keyboard Shortcuts menu.
If you wish to replace the default keybinding, add the following to keybindings.json
:
[
...
{
"key": "shift+cmd+t",
"command": "-extension.goToTest", // Notice the `-` sign
"when": "editorTextFocus"
},
...
]