Skip to content

GitHub Copilot in VS Code: setup, suggestions, chat

Visual Studio Code is where most developers meet GitHub Copilot, and it usually receives new Copilot features first. This page walks through the editor experience in the order you use it: signing in, inline suggestions (ghost text and next edit suggestions), chat and inline chat, the keyboard shortcuts that make it fast, the settings worth knowing, and what to do when nothing appears. The examples use an invented OrdersPortal codebase.

Facts and shortcuts were checked in November 2026 against the VS Code documentation source (microsoft/vscode-docs, including its keybinding data) and the GitHub Docs. Shortcuts are the defaults; your own keybindings or extensions can override them. Copilot output varies between runs and models, so prompt examples show the request, not a fixed answer.

Topic Covers
Setup Signing in, Copilot Free, work accounts and proxies.
Inline suggestions Ghost text, partial accept, next edit suggestions.
Chat and inline chat Ask, Plan and Agent; context with #-mentions; inline chat.
Keyboard shortcuts VS Code, JetBrains and Visual Studio defaults.
Settings Turning suggestions on and off per language.
Troubleshooting No suggestions, sign-in loops, policy blocks.

Copilot is integrated into current versions of VS Code; you no longer install and configure separate extensions by hand. Hover over the Copilot icon in the Status Bar, select Use AI Features, choose a sign-in method and follow the browser prompt. If your GitHub account already has a Copilot plan or an organization seat, VS Code uses it. If not, signing in enrolls an eligible account in Copilot Free, which includes a monthly allowance of inline suggestions and AI credits.

Before you send work code to a model, check your organization’s policy and the GitHub Copilot Trust Center. In Copilot Free, telemetry is enabled and suggestions matching public code are allowed by default; both can be changed in your GitHub Copilot settings.

Work and personal accounts are a common source of confusion. If your seat belongs to a different account, sign out from the Accounts menu and sign in again, or set a different account per workspace or profile with Accounts > Manage Extension Account Preferences > GitHub Copilot Chat. Accounts on GHE.com (GitHub Enterprise Cloud with data residency) use Continue with GHE.com in the sign-in dialog.

Behind a corporate proxy, VS Code uses its http.proxy setting or the system proxy. Point it at your proxy (fragment, invented host):

{
"http.proxy": "http://proxy.example.test:8080"
}

Pitfalls:

  • Do not turn off certificate checks. "http.proxyStrictSSL": false hides TLS problems instead of fixing them. If a proxy intercepts TLS, install its root certificate in the operating system store so VS Code trusts it.
  • The Status Bar tells you the state. The Copilot icon shows whether you are signed in, snoozed or out of allowance; check it first when something stops working.

Inline suggestions, also called ghost text, are faint grey predictions that appear at the cursor as you type. Copilot builds them from the code around the cursor, the current file and related files. Nothing is inserted until you accept: Tab accepts the whole suggestion, Esc dismisses it, Ctrl+Right Arrow (Cmd+Right Arrow on macOS) accepts the next word, and Accept Next Line Of Inline Suggestion in the Command Palette accepts one line. Alt+] and Alt+[ (Option+] and Option+[ on macOS) cycle through alternatives when there are several. Hovering over a suggestion shows a small toolbar with the same actions.

Ghost text responds best to intent: a descriptive function name, typed parameters and a comment with constraints.

// Return the total for an OrdersPortal order in cents.
// Apply the discount percentage to the subtotal, never go below 0,
// and add shipping only when the discounted subtotal is under 5000 cents.
export function orderTotalCents(lines: OrderLine[], discountPercent: number, shippingCents: number): number {
// ghost text proposes the body here
}

Next edit suggestions (NES) extend this from “what comes next at the cursor” to “what else needs to change”. After you rename a field or add a parameter, an arrow in the gutter points to the next place that probably needs an edit, such as a caller; Tab jumps to it and accepts. NES is controlled by github.copilot.nextEditSuggestions.enabled.

Inline suggestions differ from inline chat: ghost text is a passive prediction you can ignore, while inline chat is an explicit request that edits the selected code.

Pitfalls:

  • Accepting with Tab is easy to do by accident. Read the whole suggestion before accepting, especially long blocks; partial accept with Ctrl+Right Arrow is safer for unfamiliar code.
  • Untitled files get poor suggestions. Save the file with the right extension so the language is known, and keep related files open.
  • Snooze instead of disabling. The Snooze button in the Copilot Status Bar menu pauses suggestions in five-minute steps, which is handy while pairing or presenting.

The Chat view (Ctrl+Alt+I, Ctrl+Cmd+I on macOS) is where you hold a conversation. You choose how the session behaves: Ask answers questions without changing files, /plan researches a task and proposes a plan first, and Agent edits files, runs terminal commands and tests, and iterates until it is done, asking for approval according to the permission level you choose. Changed files show Keep and Undo controls, and Restore Checkpoint on an earlier request rolls back the workspace files it touched. Checkpoints do not undo terminal commands or changes to external services.

Context makes or breaks the answer. Type # to attach files, folders, symbols, terminal output or #codebase (a search across the workspace, not the whole repository in the prompt), and paste the exact error.

tests/OrderPricing.test.ts
The test "discount larger than subtotal" fails with -500.
Fix the implementation so totals never go below 0. Do not change the test.
Run the tests and summarize what changed.

Inline chat (Ctrl+I, Cmd+I on macOS) opens a prompt box in the editor for the current selection: “Handle an empty lines array without changing other behavior.” The proposed edit appears as a diff you accept or discard. Quick Chat opens a temporary conversation for a quick question, and the sparkle icon in the Source Control view generates a commit message from the staged changes.

Pitfalls:

  • Agent permissions are real permissions. An agent can run commands in your terminal. Keep manual approval for your first tasks, and review the security baseline before relaxing it.
  • Long sessions drift. When a conversation stops being about one task, start a new chat (/compact summarizes older context if you must continue).
  • Chat uses AI credits. Model choice affects cost; Auto model selection is a sensible default unless a task needs a specific model.

Default VS Code shortcuts for Copilot (Windows and Linux; macOS in the third column):

Action Windows / Linux macOS
Accept inline suggestion Tab Tab
Dismiss inline suggestion Esc Esc
Accept next word of suggestion Ctrl+Right Arrow Cmd+Right Arrow
Show next / previous suggestion Alt+] / Alt+[ Option+] / Option+[
Trigger inline suggestion Alt+\ Option+\
Open completions panel (several suggestions) Ctrl+Enter Ctrl+Return
Open the Chat view Ctrl+Alt+I Ctrl+Cmd+I
Open chat in agent mode Ctrl+Shift+I Shift+Cmd+I
Inline chat in the editor Ctrl+I Cmd+I
Command Palette Ctrl+Shift+P Shift+Cmd+P

JetBrains IDEs (IntelliJ IDEA, PyCharm, WebStorm, Rider) with the Copilot plugin use Tab and Esc to accept and dismiss, Alt+] and Alt+[ (Option+] and Option+[ on macOS) for next and previous, Alt+\ (Option+\) to trigger a suggestion and Alt+Enter (Option+Return) to open the panel of additional suggestions. Visual Studio uses Alt+. and Alt+, for next and previous suggestion (commands Edit.NextSuggestion and Edit.PreviousSuggestion). See Copilot in Visual Studio 2022.

To change a binding in VS Code, open Preferences: Open Keyboard Shortcuts and search for the command name, for example editor.action.inlineSuggest.trigger or inlineChat.start.

Pitfalls:

  • Keyboard layouts move keys. Alt+] and Alt+\ are awkward or unavailable on some non-US layouts; rebind them rather than giving up on cycling suggestions.
  • Other extensions compete for Tab. Snippet and other completion extensions can intercept it; if accept does not work, check for conflicting bindings in the Keyboard Shortcuts editor.

Most teams need only a few settings. github.copilot.enable turns inline suggestions on or off per language, with * as the default for all languages:

{
"github.copilot.enable": {
"*": true,
"markdown": false,
"plaintext": false
},
"github.copilot.nextEditSuggestions.enabled": true
}

Put team-wide preferences in the workspace .vscode/settings.json so everyone gets the same behavior, and put project conventions for chat and agents in a .github/copilot-instructions.md file rather than in settings (see Copilot best practices). Organization policies set on GitHub override local settings.

  • No suggestions at all. Check the Copilot Status Bar icon: signed in, not snoozed, allowance not used up. Make sure the file is saved with a known language and that github.copilot.enable is not false for that language. Run Trigger Inline Suggestion from the Command Palette to force one.
  • Suggestions stop on a metered connection. VS Code does not start new automatic suggestion requests while it treats the connection as metered.
  • Sign-in loops or the wrong account. Sign out from the Accounts menu, sign in with the account that holds the seat, and check the per-workspace account preference described in Setup.
  • Features missing at work. Organization or enterprise policies can disable chat, agents, specific models or public code matches. Ask an administrator instead of signing in with a personal account.
  • Proxy or TLS errors. Configure http.proxy and trust the proxy’s certificate; read the network section of the VS Code docs before changing other settings.
  • Logs. The Output panel has a GitHub Copilot channel; Developer: Toggle Developer Tools shows extension host errors.

How do ghost text, inline chat and agent mode differ? Ghost text is a passive prediction at the cursor that you accept or ignore. Inline chat is an explicit request scoped to a selection that returns a diff. Agent mode takes a task, edits multiple files and runs tools in a loop, with approvals and checkpoints.

What are next edit suggestions? Suggestions based on your recent edits that propose the next related change and its location, for example updating callers after you change a signature. They are enabled with github.copilot.nextEditSuggestions.enabled.

How do you give chat the right context? Attach the relevant files, symbols or terminal output with #-mentions, include the exact error, state constraints (what must not change) and say how to verify (which tests to run). #codebase asks for a workspace search instead of attaching everything.

Senior scenario: developers report that Copilot “got worse” after a VS Code update. How do you investigate? Separate client, account and policy causes. Check the Copilot Output channel and Status Bar for errors or exhausted allowances, confirm which model and plan are in use, compare against the organization’s Copilot policy changes and the VS Code release notes, and try a clean profile to rule out extension conflicts. Then reproduce with a fixed prompt and file so you compare like with like before raising it with GitHub support.