How to accept the code the suggested by vs code

Viewed 977

enter image description here

Actually I have started to write a for loop, My VS Code AI or GitHub Copilot I don't know what it is but completed my code, but I don't know how to accept the code when I press enter or space the code disappears is there any shortcut to print the code. I am noob to VS Code and Stack Overflow, hope you understand what I am asking.

2 Answers

Simply hit the Tab key to accept CoPilot's suggestion.

enter or space will not do that, maybe try pressing the "tab" key, it will automatically fill in the code.

Related