Skip to content

GH-300 · Domain 2: Use GitHub Copilot features · 29% of the exam

Task 2.1: Use GitHub Copilot in the IDE

Setting Copilot up in supported IDEs, working with inline suggestions, chat, plan and agent mode, and the CLI from the editor, and how exclusions show up there.

Study it

  • Setting up Copilot in VS Code, Visual Studio, JetBrains IDEs, Xcode, Eclipse and Vim

    Lesson coming

  • Inline suggestions, next edit suggestions, chat, plan mode and agent mode in the IDE

    Lesson coming

Sample questions

Try each one before opening the answer. Every option is explained, with the GitHub documentation page that proves it.

Question 1 · choose 1

In VS Code, a developer wants to take Copilot's multi-line gray-text suggestions one line at a time instead of word by word or all at once. What does the documentation tell them to do?

  1. APress Ctrl+Right Arrow repeatedly, because each press accepts one more line of the suggestion
  2. BPress Alt+] to cycle to a version of the suggestion that has only one line
  3. CPress Ctrl+Enter to open the suggestions tab and accept each line there
  4. DSet a custom keyboard shortcut for the command editor.action.inlineSuggest.acceptNextLine
Show the answer and why
  • APress Ctrl+Right Arrow repeatedly, because each press accepts one more line of the suggestion

    Incorrect

    Ctrl+Right Arrow (Command+Right Arrow on macOS) accepts the next word, not the next line.

  • BPress Alt+] to cycle to a version of the suggestion that has only one line

    Incorrect

    That shortcut swaps in a different whole suggestion; it doesn't split one by line.

  • CPress Ctrl+Enter to open the suggestions tab and accept each line there

    Incorrect

    Ctrl+Enter opens a tab with more alternative suggestions, accepted whole.

  • DSet a custom keyboard shortcut for the command editor.action.inlineSuggest.acceptNextLine

    Correct

    Accepting the next line needs a custom shortcut bound to editor.action.inlineSuggest.acceptNextLine.

For partial acceptance in VS Code, Copilot offers Accept Word in the hover control or Ctrl+Right Arrow (Command+Right Arrow on macOS). To accept the next line of a suggestion, you set a custom keyboard shortcut for editor.action.inlineSuggest.acceptNextLine. Ctrl+Enter opens multiple suggestions in a new tab.

Question 2 · choose 1

A team mandates that Copilot must draft a read-only implementation plan for review before any agent edits code. Developers use VS Code, JetBrains IDEs, Eclipse and Visual Studio. In which of these IDEs can they not use the plan agent today?

  1. AJetBrains IDEs
  2. BVS Code
  3. CVisual Studio
  4. DEclipse
Show the answer and why
  • AJetBrains IDEs

    Incorrect

    Plan mode is available in JetBrains IDEs.

  • BVS Code

    Incorrect

    Plan mode is available in VS Code from the agents dropdown.

  • CVisual Studio

    Correct

    Plan mode is available in VS Code, JetBrains IDEs, Xcode and Eclipse, and is not currently available in Visual Studio.

  • DEclipse

    Incorrect

    Plan mode is available in Eclipse.

The plan agent researches a task with read-only tools, breaks it into steps with open questions, and makes no code changes until you approve the plan. It is available in Visual Studio Code, JetBrains IDEs, Xcode and Eclipse, and not currently in Visual Studio.

Question 3 · choose 1

A developer whose Copilot Business license comes from her organization turns on github.copilot.nextEditSuggestions.enabled in VS Code, but no edit predictions ever appear. A colleague on a personal Copilot Pro plan sees them with the same setting. What is the most likely cause?

  1. ANext edit suggestions are only included in the Copilot Pro+ and Copilot Max plans
  2. BHer organization has not enabled the Editor preview features setting that the plan requires
  3. CNext edit suggestions require the plan agent to be selected in the chat view
  4. DThe setting only takes effect after the GitHub Copilot app is installed
Show the answer and why
  • ANext edit suggestions are only included in the Copilot Pro+ and Copilot Max plans

    Incorrect

    The plans page lists next edit suggestions for all plans, including Business.

  • BHer organization has not enabled the Editor preview features setting that the plan requires

    Correct

    For Business and Enterprise plans, the organization or enterprise must enable the Editor preview features setting.

  • CNext edit suggestions require the plan agent to be selected in the chat view

    Incorrect

    Next edit suggestions are an inline feature in the editor, not a chat mode.

  • DThe setting only takes effect after the GitHub Copilot app is installed

    Incorrect

    The setting is a VS Code setting and needs no separate desktop app.

You enable next edit suggestions in VS Code with github.copilot.nextEditSuggestions.enabled. If you use Copilot Business or Copilot Enterprise, the organization or enterprise that provides your plan must enable the Editor preview features setting before the feature works.

Question 4 · choose 1

A developer cloned github/copilot.vim into Neovim's package directory, but :Copilot setup fails immediately. The machine has Neovim 0.10 and no Node.js. What should they install first?

  1. AThe GitHub CLI, because the plugin signs in by calling gh auth login
  2. BPython 3, because the plugin's language server is a Python package
  3. CVim 9.0.0185, because the plugin does not run on Neovim
  4. DNode.js version 18 or above
Show the answer and why
  • AThe GitHub CLI, because the plugin signs in by calling gh auth login

    Incorrect

    The plugin's documented prerequisites are an editor version and Node.js, not the GitHub CLI.

  • BPython 3, because the plugin's language server is a Python package

    Incorrect

    The requirement is Node.js 18 or above, not Python.

  • CVim 9.0.0185, because the plugin does not run on Neovim

    Incorrect

    The plugin supports Neovim 0.6 or above as well as Vim 9.0.0185 or above.

  • DNode.js version 18 or above

    Correct

    Copilot in Vim/Neovim needs Vim 9.0.0185 or Neovim 0.6 or above and Node.js version 18 or above.

To use GitHub Copilot in Vim/Neovim you need Vim version 9.0.0185 or Neovim version 0.6 or above, and Node.js version 18 or above. After installing github/copilot.vim, you run :Copilot setup and then enable it with :Copilot enable.

Question 5 · choose 1

A developer is setting up GitHub Copilot in VS Code for the first time. What does the documentation say about the extensions it needs?

  1. AThey must be downloaded from the GitHub Marketplace and installed manually
  2. BThey are installed automatically during the first-time setup
  3. CThey come preinstalled in every VS Code release and can't be removed
  4. DThey are only available to organizations on Copilot Business
Show the answer and why
  • AThey must be downloaded from the GitHub Marketplace and installed manually

    Incorrect

    Manual download is not needed in VS Code.

  • BThey are installed automatically during the first-time setup

    Correct

    When you set up GitHub Copilot in VS Code for the first time, the required extensions are installed automatically.

  • CThey come preinstalled in every VS Code release and can't be removed

    Incorrect

    They are installed during setup, not preinstalled.

  • DThey are only available to organizations on Copilot Business

    Incorrect

    Copilot in VS Code works with Copilot Free and paid plans.

When you set up GitHub Copilot in Visual Studio Code for the first time, the required extensions are installed automatically; you don't need to download or install them manually. To use Copilot you need limited access through Copilot Free or a paid plan.

Question 6 · choose 1

On Windows, a VS Code user wants to see the next alternative inline suggestion for the same position without opening a new tab. Which keyboard shortcut does that?

  1. ACtrl+Enter
  2. BCtrl+Right Arrow
  3. CEsc
  4. DAlt+]
Show the answer and why
  • ACtrl+Enter

    Incorrect

    Ctrl+Enter opens a new tab with multiple additional suggestions.

  • BCtrl+Right Arrow

    Incorrect

    Ctrl+Right Arrow accepts the next word of the suggestion.

  • CEsc

    Incorrect

    Esc rejects the suggestions.

  • DAlt+]

    Correct

    Alt+] shows the next suggestion and Alt+[ the previous one on Windows or Linux.

For any input, Copilot may offer multiple suggestions. In VS Code, Alt+] shows the next suggestion and Alt+[ the previous one on Windows or Linux (Option or Alt with ] or [ on macOS). Tab accepts, Esc rejects all, Ctrl+Enter opens multiple suggestions in a new tab, and Ctrl+Right Arrow accepts the next word.

Question 7 · choose 1

A developer working in the VS Code integrated terminal wants to ask Copilot about a failing command right there, without opening the chat view. Which shortcut starts inline chat in the editor or terminal on Windows?

  1. ACtrl+I
  2. BCtrl+Shift+Alt+L
  3. CCtrl+Shift+P
  4. DAlt+[
Show the answer and why
  • ACtrl+I

    Correct

    Ctrl+I (Command+I on macOS) starts an inline chat directly in the editor or integrated terminal.

  • BCtrl+Shift+Alt+L

    Incorrect

    That shortcut opens the quick chat dropdown.

  • CCtrl+Shift+P

    Incorrect

    That opens the Command Palette.

  • DAlt+[

    Incorrect

    That shows the previous alternative inline suggestion.

Besides the chat view, VS Code offers quick chat (Ctrl+Shift+Alt+L on Windows/Linux), inline chat in the editor or integrated terminal (Ctrl+I, or Command+I on macOS), and smart actions from the context menu or the sparkle icon.

Question 8 · choose 1

An IT team is rolling out Copilot to developers on Visual Studio 2022 version 17.12. What do they need to know about installing the Copilot extension?

  1. AThe extension must be installed from the JetBrains Marketplace
  2. BVisual Studio requires the github/copilot.vim plugin
  3. CSince 17.10 the Copilot extension ships built in
  4. DCopilot is only available in Visual Studio for Mac
Show the answer and why
  • AThe extension must be installed from the JetBrains Marketplace

    Incorrect

    The JetBrains Marketplace is for JetBrains IDEs.

  • BVisual Studio requires the github/copilot.vim plugin

    Incorrect

    copilot.vim is for Vim and Neovim.

  • CSince 17.10 the Copilot extension ships built in

    Correct

    Starting from Visual Studio 2022 version 17.10, the unified Copilot and Copilot Chat extension is included by default.

  • DCopilot is only available in Visual Studio for Mac

    Incorrect

    Copilot is not currently available for Visual Studio for Mac.

Starting from Visual Studio 2022 version 17.10, the unified Copilot and GitHub Copilot Chat extension is included by default as a built-in component. Older versions (17.8 and 17.9) install the extension; in all cases you add your GitHub account to Visual Studio to enable Copilot.

Practise domain 2 →Practise all domains →