Completions
Inline completions (ghost text) are Copilot’s oldest and still most frequent feature: you type, the model continues at the cursor in gray. Official references: Getting code suggestions in your IDE and Keyboard shortcuts.
A suggestion enters the file only when you explicitly accept. Keeping typing ignores it. That is human-in-the-loop, not an automatic repo rewrite.
What it looks at
Copilot uses the current file, nearby open editors, and the comments and identifiers you just wrote. GitHub’s advice: keep truly related files open and close unrelated tabs so suggestions do not blend the wrong project.
Language coverage is broad; GitHub calls out Python, JavaScript, TypeScript, Ruby, Go, C#, and C++ as especially strong. Queries, API boilerplate, and infrastructure-as-code can get suggestions too.
If suggestions are rare or always blocked, check personal or org policies such as blocking matches with public code—see Managing Copilot policies.
Accept, reject, cycle
VS Code defaults (rebind by command name in Keyboard Shortcuts):
Hover the ghost text for the Copilot control: Accept, next/previous, and Accept Word. You can also accept the next line—trust the control labels and your VS Code version.
JetBrains also uses Tab / Esc; next is Alt+] on Windows and Option+] on macOS. The multi-suggestion UI is often Ctrl+Enter on Windows and Command+Shift+A on macOS per GitHub’s table (your keymap wins).
Comments-to-code
Describe the goal in a natural-language comment, leave a function or method header, and Copilot tries to implement it. GitHub’s Java sample is along the lines of “find images without alt text and give them a red border,” then void process(). In JavaScript you can practice:
Put in the comment:
- Input / output types
- Error behavior (throw, null, empty array)
- Libraries not to use (so it does not add a dependency you do not have)
After accept, run a tiny example or existing tests. Comment-driven generation is great for boilerplate; algorithms and security-sensitive logic still need tests you designed.
Copilot can also go the other way: write code, type the language’s doc-comment starter above it (///, """, …), and wait for a comment suggestion. GitHub notes that on Copilot Free, comment suggestions may count toward Chat usage rather than completion usage—check the current plan page.
Next Edit Suggestions (NES)
Newer VS Code Copilot builds can predict where the next edit should go and what it should be, not only an insertion after the cursor. Accept / jump keys follow VS Code’s NES docs (Quickstart: “Get familiar with next edit suggestions”). If they collide with Tab complete, search Keyboard Shortcuts for inlineSuggest and nextEdit.
Toggles and per-language disable
- The Status Bar Copilot menu can pause / resume.
- Setting
github.copilot.enablecan switch languages off (for exampleplaintext). - There is no default “master off” shortcut; the command is
github.copilot.toggleCopilot—bind it if you want.
Organizations can exclude content so some paths never enter the prompt. Turning Copilot off locally does not replace enterprise policy.
Habits that help
Useful:
- Write a real function name and a one- or two-line comment before waiting
- Format and run lint / tests immediately after accept
- Review suggestions like a paste from the internet: license, secrets, wrong APIs
Wasteful:
- Typing
functionin an empty file and expecting a whole service - Hitting
Tabten times without reading the gray text - Treating a completion as “already code-reviewed”
Do not put secrets, tokens, or customer data in comments “to help the model.”
If Alt+\ fails to trigger on Windows, the layout or IME may be swallowing \; rebind editor.action.inlineSuggest.trigger. On macOS, Option+\ is awkward on some ISO keyboards—rebind that too.