kasecato / vscode-intellij-idea-keybindings

Port of IntelliJ IDEA key bindings for VS Code.
https://marketplace.visualstudio.com/items?itemName=k--kato.intellij-idea-keybindings
MIT License
819 stars 136 forks source link

run previous Go test #171

Closed glyn closed 4 years ago

glyn commented 4 years ago

On IntelliJ on macOS, this very useful function is bound to ctrl+r.

In vscode (with the intellij keybinding) ctrl+r is bound to "File: Open Recent".

Would it be feasible to rebind ctrl+r to Go: Test Previous as part of the intellij keybinding?

kasecato commented 4 years ago

@glyn Thanks. With VSCode default settings, ctrl+r on macOS is showing recently used files. I should to fix this.

Checking the default bindings for IntelliJ, it seems that macOS has "Run" assigned to it. So, I should remap it to "Tasks: Run Task". Is that okay?

glyn commented 4 years ago

Checking the default bindings for IntelliJ, it seems that macOS has "Run" assigned to it. So, I should remap it to "Tasks: Run Task". Is that okay?

Thanks, that may suit some languages, but it doesn't help for Go development. "Tasks: Run Task" doesn't re-run the last Go test, it produces a message "No task to run found. Configure Tasks...".

(My current workaround is to manually bind ctrl+r to 'Go: Test Previous'.)

kasecato commented 4 years ago

@glyn Okay, I will change it to 'Go: Test Previous' when "editorLangId == go" 👌 https://code.visualstudio.com/docs/getstarted/keybindings#_contexts

kasecato commented 4 years ago

@glyn I've released it in v.0.2.38. Please check it.

glyn commented 4 years ago

Excellent, that works fine and is a great solution. Thanks!