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?
Asked
Active
Viewed 5,702 times
10

linka
- 149
- 1
- 9
2 Answers
23
To enable suggestions for GitHub Copilot with a Tab key, follow the steps below.
Open the file
keybindings.json
in Visual Studio Code. This can be done by pressing Ctrl + Shift + P, and typing Open Keyboard Shortcuts (JSON).In
keybindings.json
, add the following.[ { "key": "tab", "command": "editor.action.inlineSuggest.commit", "when": "textInputFocus && inlineSuggestionHasIndentationLessThanTabSize && inlineSuggestionVisible && !editorTabMovesFocus" } ]
This should now enable you to accept suggestions in Markdown using the Tab key!

Arnav Thorat
- 3,078
- 3
- 8
- 33
-
1Thanks 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 again – linka Apr 11 '22 at 02:02
-
```json { "key": "tab", "command": "editor.action.inlineSuggest.commit", "when": "textInputFocus && inlineSuggestionHasIndentationLessThanTabSize && inlineSuggestionVisible && !editorTabMovesFocus" }, ``` – defend orca Apr 10 '23 at 07:48
-
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. – Musilix Aug 30 '23 at 00:12