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?
Question posted in Visual Studio Code
View the official documentation.
View the official documentation.
2
Answers
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'salt + ]
andalt + [
for next suggestion and previous suggestion.The default keyboard shortcut is now "Cmd/Ctrl + Right Arrow".