Keyboard Shortcuts N Next post
P Previous post
S Save / unsave
R Read aloud
T Toggle theme
/ Focus search
Esc Close panels
🔥
Ready to read...
beginner GitHub Copilot IMCSEIAN Inline Completions Tutorial

Triggering Inline Completions: Tab, Hover, Next/Prev

Reviewed & accurate
AI Summary
IMCSEIAN · GitHub Copilot Master Course

Triggering Inline Completions: Tab, Hover, Next/Prev

Use ghost-text completions fluidly — accept, reject, cycle alternatives.

Phase 1 — Beginner Lesson BE-07 Difficulty: Beginner 7 min read
Course: GitHub Copilot Phase 1 — Beginner 7 min read Last verified: 2026-08-30

What You Will Learn

  • Trigger completions by typing and pausing.
  • Accept with Tab, reject with Esc.
  • Cycle alternatives with Alt+[ and Alt+].
  • Use partial acceptance (accept word by word).
  • Force-trigger when no suggestion appears.

Why This Matters

Inline completions are the most-used Copilot surface. Knowing the keyboard shortcuts fluidly turns Copilot from a curiosity into a tool you reach for every minute.

Concept Explained

Inline completions appear as gray ghost text after you pause typing. The model watches your cursor and the surrounding lines, predicts what comes next, and renders the prediction inline. You accept, reject, or cycle alternatives.

How It Works

VS Code listens to text-changed events, debounces for the configured delay (~400ms default), sends context to the Copilot service, and renders the returned tokens as ghost text. Pressing Tab merges the ghost text into your buffer. Cycling asks the service for alternative completions.

Step-by-Step Tutorial

1. Trigger a completion

Open a .ts/.py/.js file. Type `function add(a, b) {` and pause. Gray text appears proposing a body.

2. Accept with Tab

Press Tab to accept the whole suggestion. Use Ctrl+Right (Cmd+Right) to accept word-by-word.

3. Reject with Esc

Press Esc to dismiss. The suggestion won't reappear until you type more.

4. Cycle alternatives

Press Alt+] (Option+] on Mac) for next alternative, Alt+[ for previous.

5. Force-trigger

Press Alt+\ (Option+\) to manually request a completion when none appeared.

Real-World Example

A backend dev writing a TypeScript Express handler typed the function signature and paused. Copilot proposed a complete handler with error handling, validation, and a typed response. The dev accepted the body, modified the validation rules to match their schema, and shipped in 90 seconds. Without Copilot, the same handler would have taken 5 minutes.

Example Prompts / Commands / Code

TypeScriptimcseian
// Type this signature and pause:
function parseDate(input: string): Date | null {
  // Copilot proposes:
  //   const d = new Date(input);
  //   return isNaN(d.getTime()) ? null : d;
}
Keyboard cheat sheetimcseian
Tab                 accept full suggestion
Ctrl+Right          accept one word
Esc                dismiss
Alt+]  (Opt+])     next alternative
Alt+[  (Opt+[)     previous alternative
Alt+\  (Opt+\)     force trigger

Common Mistakes

  • Tab-Tab-Tab without reading — biggest source of Copilot bugs.
  • Forgetting Esc exists — dismissing bad suggestions is as important as accepting good ones.
  • Never cycling alternatives — the first suggestion isn't always best.
  • Forcing triggers constantly — uses more credits, rarely helps.

Best Practices

  • Read every suggestion before accepting.
  • Cycle alternatives when the first suggestion feels off.
  • Accept word-by-word for long suggestions to keep control.
  • Adjust the delay in settings to match your typing speed.

Troubleshooting

ProblemHow to Fix
No ghost text appearsCheck the status icon is healthy. Verify the language is supported. Try force-trigger (Alt+\).
Tab doesn't acceptCheck keybindings for conflicts. Search 'Accept Copilot Suggestion' in Keyboard Shortcuts.
Suggestions feel slowIncrease the debounce delay (counterintuitively, faster requests feel slower when rate-limited). Try a smaller model.

Practical Exercise

Your Turn

Write a function `isPalindrome(s: string): boolean` using only Copilot suggestions. Try the cycle alternatives at least twice.

Key Takeaways

  • Tab accepts, Esc dismisses, Alt+[/] cycles.
  • Read before accepting — always.
  • Word-by-word acceptance keeps control on long suggestions.
  • Force-trigger when no suggestion appears.
  • Adjust debounce to match your typing rhythm.

Frequently Asked Questions

Can I disable inline completions temporarily?
Yes — click the Copilot status icon and toggle 'Completions'. Or use the command palette.
Why are suggestions sometimes way off?
Context is probably wrong — save the file, reopen, or use Chat with @workspace.
Does cycling cost more credits?
Yes, marginally. Don't cycle excessively.

Further Reading

Official References

Related lessons: BE-08, BE-13

SEO Metadata

SEO title: Triggering Inline Completions: Tab, Hover, Next/Prev

Meta description: Use ghost-text completions fluidly — accept, reject, cycle alternatives.

Primary keyword: triggering inline completions

Secondary keywords: triggering inline completions: tab, hover, next/prev

Search intent: Informational

URL slug: /triggering-github-copilot-inline-completions

Categories: AI Tools, GitHub Copilot

Tags: GitHub Copilot, Beginner, Inline Completions, IMCSEIAN, Tutorial, IMCSEIAN

Featured image concept: IMCSEIAN lesson card for Triggering Inline Completions: Tab, Hover, Next/Prev

Test Your Knowledge
How did you find this?

Comments

Join the discussion! Sign in with your Google or Blogger account, or comment as Anonymous - no account needed. For quick questions, also reach me on Telegram @cytestch.

Comments