I would like to be able to accept only the next word of a github Copilot suggestion, instead of the full suggestion. Is there a way to do this?
Asked
Active
Viewed 3,509 times
2 Answers
12
The default keyboard shortcut is now "Cmd/Ctrl + Right Arrow".

Amiratak88
- 1,204
- 12
- 18
-
Note: The vim Extensions `extension.vim_cmd+right` shortcut has higher precedence seemingly, so I had to remove that shortcut for the partial accept to work. – Simon Boehm Aug 02 '23 at 15:34
5
This option exists in VSCode keyboard preferences, but is not enabled by default (though a default keybinding might be coming soon). To enable a shortcut to accept only the next word, in VS Code go to File -> Preferences -> KeyboardShortcuts -> type "acceptNextWord" -> click "+" -> enter your desired keyboard shortcut.
I set acceptNextWord to be alt + RightArrow
to be analogous to Copilot's alt + ]
and alt + [
for next suggestion and previous suggestion.

Jacob Stern
- 3,758
- 3
- 32
- 54
-
3
-
I wish this existed for Visual Studio too as it's a great feature. – Ben Thomson Apr 12 '23 at 22:10