Search code examples
visual-studio-codekeyboard-shortcutsgithub-copilot

How to accept only the next word in github copilot suggestion


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?


Solution

  • The default keyboard shortcut is now "Cmd/Ctrl + Right Arrow".

    For custom keybindings, paste something like the following into the keybindings.json file (which you can find through the omnibox):

    {
      "key": "shift+ctrl+right",
      "command": "editor.action.inlineSuggest.acceptNextWord",
      "when": "inlineSuggestionVisible && !editorReadonly"
    }