I can get some suggestions by copilot in .md files, But when I keydowned Tab, it only added a space, not autocompletes the suggestion, What should I do can autocomplete the suggestion?
2 Answers
To enable suggestions for GitHub Copilot with a Tab key, follow the steps below.
Open the file
keybindings.jsonin Visual Studio Code. This can be done by pressing Ctrl + Shift + P, and typing Open Keyboard Shortcuts (JSON).In
keybindings.json, add the following (inside the existing square brackets[]):{ "key": "tab", "command": "editor.action.inlineSuggest.commit", "when": "textInputFocus && inlineSuggestionHasIndentationLessThanTabSize && inlineSuggestionVisible && !editorTabMovesFocus" }
Make sure to restart VS Code after this.
4 Comments
linka
Thanks for your answer, I tried a while,
editor.action.inlineSuggestion.commit is a invalid command, but editor.action.inlineSuggest.commit is a valid command, base on your code, I wrote a seems correct keybinds Comments cnat't add block code, so I edited my question for adding keybinds Thanks againdefend orca
json { "key": "tab", "command": "editor.action.inlineSuggest.commit", "when": "textInputFocus && inlineSuggestionHasIndentationLessThanTabSize && inlineSuggestionVisible && !editorTabMovesFocus" }, Musilix
You are a god. I looked for 1 full day on how to resolve this junk and only you gave me a working solution. Thank you so much, truly.
anileates
Do not forget to restart your VS code after this.
