How to change the default keybind for accepting IntelliSense / Copilot suggestion in VS 2022
Asked Answered
E

1

6

I have installed VS 2022 and Github Copilot. When there is a code recomandation, it suggests to press TAB to accept the suggestion, but I want to assign another key for this and leave the TAB for inserings actual TABs in the code.

enter image description here

I have tried to change a few bindings from Options > Environment > Keyboard but none seems to affect this one.

Is there any way to change this action's key to something else ?

Elan answered 12/5, 2023 at 9:27 Comment(3)
This. This is actually the reason I'm not using copilot :(Gualterio
related? https://mcmap.net/q/1917403/-vs-code-suggestion-widget-and-inline-suggestions-conflict/11107541Shanon
Funny, I want the opposite (tab to accept the suggestion) so it works the same as VS Code, but tab does not work -- it inserts a tab -- and I have to press the right arrow to accept the suggestion.Strow
B
1

With the workaround I found here, I can accept CoPilot suggestions with the right-arrow key while using Emacs keybindings.

You can use right arrow key instead of tab:

go to Tools -> Options -> IntelliCode -> Completions for whole lines of code. Enable the setting named Apply completions for whole lines on right arrow. Copilot is affected by this option.

https://learn.microsoft.com/en-us/visualstudio/intellicode/visual-studio-whole-line-completions

Beatrice answered 29/5, 2024 at 15:13 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.