From 8583c3bd94f4797395c1266f9f56bd4b5586cecd Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Tue, 26 Mar 2024 17:04:55 -0700 Subject: [PATCH] Add go to implementation shortcut (#9837) This adds a keybinding for an existing action. Notably, our bindings for `Go To Type Definition` and `Go To Implementation` are swapped from VSCode. We use `cmd` and `shift`, they use `shift` and `cmd`. Release Notes: - Added a keybinding for `editor::GoToImplementation` --- assets/keymaps/default-linux.json | 3 ++- assets/keymaps/default-macos.json | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/assets/keymaps/default-linux.json b/assets/keymaps/default-linux.json index 62a15ee19d266..9734d5ec9a853 100644 --- a/assets/keymaps/default-linux.json +++ b/assets/keymaps/default-linux.json @@ -74,7 +74,7 @@ // "cmd-left": "editor::MoveToBeginningOfLine", // "ctrl-a": "editor::MoveToBeginningOfLine", // "cmd-right": "editor::MoveToEndOfLine", - // "ctrl-e": "editor::MoveToEndOfLine", + // "ctrl-e": "editor::MoveToEndOfLine", "ctrl-home": "editor::MoveToBeginning", "ctrl-end": "editor::MoveToEnd", "shift-up": "editor::SelectUp", @@ -345,6 +345,7 @@ "f12": "editor::GoToDefinition", "alt-f12": "editor::GoToDefinitionSplit", "ctrl-f12": "editor::GoToTypeDefinition", + "shift-f12": "editor::GoToImplementation", "alt-ctrl-f12": "editor::GoToTypeDefinitionSplit", "alt-shift-f12": "editor::FindAllReferences", "ctrl-m": "editor::MoveToEnclosingBracket", diff --git a/assets/keymaps/default-macos.json b/assets/keymaps/default-macos.json index 6f2554b890458..d1b12be7571bf 100644 --- a/assets/keymaps/default-macos.json +++ b/assets/keymaps/default-macos.json @@ -366,6 +366,7 @@ "f12": "editor::GoToDefinition", "alt-f12": "editor::GoToDefinitionSplit", "cmd-f12": "editor::GoToTypeDefinition", + "shift-f12": "editor::GoToImplementation", "alt-cmd-f12": "editor::GoToTypeDefinitionSplit", "alt-shift-f12": "editor::FindAllReferences", "ctrl-m": "editor::MoveToEnclosingBracket",