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?
APress Ctrl+Right Arrow repeatedly, because each press accepts one more line of the suggestion
BPress Alt+] to cycle to a version of the suggestion that has only one line
CPress Ctrl+Enter to open the suggestions tab and accept each line there
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.
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?
AJetBrains IDEs
BVS Code
CVisual Studio
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.
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?
ANext edit suggestions are only included in the Copilot Pro+ and Copilot Max plans
BHer organization has not enabled the Editor preview features setting that the plan requires
CNext edit suggestions require the plan agent to be selected in the chat view
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.
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?
AThe GitHub CLI, because the plugin signs in by calling gh auth login
BPython 3, because the plugin's language server is a Python package
CVim 9.0.0185, because the plugin does not run on Neovim
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.
A developer is setting up GitHub Copilot in VS Code for the first time. What does the documentation say about the extensions it needs?
AThey must be downloaded from the GitHub Marketplace and installed manually
BThey are installed automatically during the first-time setup
CThey come preinstalled in every VS Code release and can't be removed
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.
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?
ACtrl+Enter
BCtrl+Right Arrow
CEsc
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.
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?
ACtrl+I
BCtrl+Shift+Alt+L
CCtrl+Shift+P
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.
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?
AThe extension must be installed from the JetBrains Marketplace
BVisual Studio requires the github/copilot.vim plugin
CSince 17.10 the Copilot extension ships built in
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.