You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
Switching back and forth between the implementation and the test file should be able to be mapped to a keyboard shortcut. We have 2 exposed commands that can be mapped:
Toggle would be a better option, in which case I'd prefer to replace the existing 2 commands with just a single command "Go: Toggle Test File" (needs a better name?)
The when api does support the editorLangId which we can use to bind to the toggle command.
ramya-rao-a
changed the title
Documentation: how to add a keyboard shortcut to switch between impl / test files
Combine go to test file and implementation of test file commands to a single toggle command
Jan 18, 2017
The latest update (0.6.53) has this new toggle command.
From the Changelog:
New toggle command Go: Toggle Test File that lets you toggle between your Go file and the corresponding test file. Previous commands Go: Open Test File and Go: Open Implementation For Test File have been deprecated in favor of this new command. PR 739. You can add a keyboard binding to this as below:
Switching back and forth between the implementation and the test file should be able to be mapped to a keyboard shortcut. We have 2 exposed commands that can be mapped:
https://github.com/Microsoft/vscode-go/blob/fcc14da45c4228a2c8ce0aca5f7b2842eb03ef74/package.json#L139
go.open.test.file
go.open.test.implementation
Would work one way, but we would need to add some sort of
when
condition. A potentially better option would be to have a toggle command.@ramya-rao-a what do you think?
The text was updated successfully, but these errors were encountered: