Next edit suggestions (VS Code) [Public Preview] (#54195)
Co-authored-by: Jules <19994093+jules-p@users.noreply.github.com>
This commit is contained in:
BIN
assets/images/help/copilot/vsc-advanced-code-completion-menu.png
Normal file
BIN
assets/images/help/copilot/vsc-advanced-code-completion-menu.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 73 KiB |
@@ -18,6 +18,10 @@ redirect_from:
|
||||
|
||||
Autocomplete-style suggestions from {% data variables.product.prodname_copilot_short %} in supported IDEs _({% data variables.product.prodname_vscode %}, {% data variables.product.prodname_vs %}, JetBrains IDEs, Azure Data Studio, Xcode, and Vim/Neovim)_. For more information, see [AUTOTITLE](/copilot/using-github-copilot/getting-code-suggestions-in-your-ide-with-github-copilot).
|
||||
|
||||
If you use {% data variables.product.prodname_vscode_shortname %}, you can also use {% data variables.copilot.next_edit_suggestions %}, which will predict the location of the next edit you are likely to make and suggest a completion for it.
|
||||
|
||||
> [!NOTE] {% data variables.copilot.next_edit_suggestions_caps %} is currently in {% data variables.release-phases.public_preview %} and is subject to change.
|
||||
|
||||
### {% data variables.product.prodname_copilot_chat_short %}
|
||||
|
||||
A chat interface that lets you ask coding-related questions. {% data variables.product.prodname_copilot_chat %} is available on the {% data variables.product.github %} website, in {% data variables.product.prodname_mobile %}, in supported IDEs _({% data variables.product.prodname_vscode %}, {% data variables.product.prodname_vs %}, and JetBrains IDEs)_, and in {% data variables.product.prodname_windows_terminal %}. Users can also use skills with {% data variables.product.prodname_copilot_chat_short %}. For more information, see [AUTOTITLE](/copilot/using-github-copilot/asking-github-copilot-questions-in-github) and [AUTOTITLE](/copilot/using-github-copilot/asking-github-copilot-questions-in-your-ide).
|
||||
|
||||
@@ -257,7 +257,7 @@ If you use {% data variables.product.prodname_vscode %}, you can use {% data var
|
||||
* Learn from the code {% data variables.product.prodname_copilot_short %} generates
|
||||
* Help you configure your editor
|
||||
|
||||
You can learn more about scenarios and setup in the [VS Code documentation](https://code.visualstudio.com/docs/copilot/overview#_use-cases-for-github-copilot-in-vs-code).
|
||||
You can learn more about scenarios and setup in the [{% data variables.product.prodname_vscode_shortname %} documentation](https://code.visualstudio.com/docs/copilot/overview#_use-cases-for-github-copilot-in-vs-code).
|
||||
|
||||
After you install the {% data variables.product.prodname_copilot %} extension, you can enable or disable it, and you can configure advanced settings within {% data variables.product.prodname_vscode %} or on {% data variables.product.github %}.
|
||||
|
||||
@@ -317,6 +317,12 @@ You can choose to enable or disable inline suggestions for {% data variables.pro
|
||||
1. In the left-side panel of the settings tab, click **Extensions** and then select **{% data variables.product.prodname_copilot_short %}**.
|
||||
1. Under "Inline Suggest:Enable," select or deselect the checkbox to enable or disable inline suggestions.
|
||||
|
||||
## Enabling {% data variables.copilot.next_edit_suggestions %}
|
||||
|
||||
You can enable {% data variables.copilot.next_edit_suggestions %} via the {% data variables.product.prodname_vscode_shortname %} setting `github.copilot.nextEditSuggestions.enabled`. For more detailed instructions, see [Enabling edit suggestions](https://code.visualstudio.com/docs/copilot/ai-powered-suggestions#_enabling-edit-suggestions) in the {% data variables.product.prodname_vscode_shortname %} documentation.
|
||||
|
||||
If you have a {% data variables.product.prodname_copilot_business_short %} {% ifversion ghec %}or {% data variables.product.prodname_copilot_enterprise_short %}{% endif %} subscription, then the organization {% ifversion ghec %}or enterprise{% endif %} from which you receive your subscription must enable the **Editor Preview Features** setting. See [AUTOTITLE](/enterprise-cloud@latest/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#enabling-copilot-features-in-your-organization){% ifversion ghec %} or [AUTOTITLE](/enterprise-cloud@latest/copilot/managing-copilot/managing-copilot-for-your-enterprise/managing-policies-and-features-for-copilot-in-your-enterprise#configuring-policies-for-github-copilot){% endif %}.
|
||||
|
||||
## Enabling or disabling {% data variables.product.prodname_copilot %} for specific languages
|
||||
|
||||
You can specify which languages you want to enable or disable {% data variables.product.prodname_copilot %} for.
|
||||
|
||||
@@ -23,8 +23,11 @@ topics:
|
||||
{% data variables.product.prodname_copilot_free_short %} includes the following features:
|
||||
|
||||
* Code completion in {% data variables.product.prodname_vscode %}, {% data variables.product.prodname_vs %}, JetBrains IDEs, Vim/Neovim, Xcode, and Azure Data Studio
|
||||
* {% data variables.product.prodname_copilot_edits_vscode_short %} to make changes across multiple files (**only in {% data variables.product.prodname_vscode %} and {% data variables.product.prodname_vs %}**)
|
||||
* {% data variables.copilot.next_edit_suggestions_caps %}, which will predict the location of the next edit you are likely to make and suggest a completion for it. (**only in {% data variables.product.prodname_vscode_shortname %}**)
|
||||
* {% data variables.product.prodname_copilot_edits_vscode_short %} to make changes across multiple files. {% data variables.product.prodname_copilot_edits_vscode_short %} is available in two modes: edit mode and agent mode. (**only in {% data variables.product.prodname_vscode_shortname %}**)
|
||||
* {% data variables.product.prodname_copilot_chat_short %} in {% data variables.product.prodname_vscode %}, {% data variables.product.prodname_vs %}, JetBrains IDEs, and {% data variables.product.prodname_dotcom_the_website %}
|
||||
* Custom instructions (**only in {% data variables.product.prodname_vs %}, {% data variables.product.prodname_vscode_shortname %}, and {% data variables.product.prodname_dotcom_the_website %}**)
|
||||
* Prompt files (**only in {% data variables.product.prodname_vscode_shortname %}**)
|
||||
* Block suggestions matching public code
|
||||
* Access to the {% data variables.copilot.copilot_claude_sonnet %} and {% data variables.copilot.copilot_gemini_flash %} models
|
||||
* Access to {% data variables.product.prodname_copilot_extensions_short %} in {% data variables.product.prodname_vscode %}, {% data variables.product.prodname_vs %}, JetBrains IDEs, {% data variables.product.prodname_dotcom_the_website %}, and {% data variables.product.prodname_mobile %}
|
||||
|
||||
@@ -29,6 +29,7 @@ You can configure any of the following policies for your enterprise:
|
||||
* [{% data variables.product.prodname_copilot_short %} in {% data variables.product.prodname_dotcom_the_website %}](#copilot-in-githubcom)
|
||||
* [{% data variables.product.prodname_copilot_cli %}](#github-copilot-in-the-cli)
|
||||
* [{% data variables.product.prodname_copilot_chat %} in the IDE](#github-copilot-chat-in-the-ide)
|
||||
* [Editor preview features](#editor-preview-features)
|
||||
* [{% data variables.product.prodname_copilot_mobile %}](#github-copilot-chat-in-github-mobile)
|
||||
* [{% data variables.product.prodname_copilot_extensions %}](#github-copilot-extensions)
|
||||
* [Suggestions matching public code](#suggestions-matching-public-code)
|
||||
@@ -54,6 +55,10 @@ If you enable "{% data variables.product.prodname_copilot_short %} in {% data va
|
||||
|
||||
You can chat with {% data variables.product.prodname_copilot %} in your IDE to get code suggestions and answers to coding-related questions without context switching.
|
||||
|
||||
### Editor preview features
|
||||
|
||||
Some features of {% data variables.product.prodname_copilot_short %} are available as preview features in your editor. You can enable or disable these features for your enterprise.
|
||||
|
||||
### {% data variables.product.prodname_copilot_mobile %}
|
||||
|
||||
{% data variables.product.prodname_copilot_mobile %} is a chat interface that lets you interact with {% data variables.product.prodname_copilot %} to ask and receive answers to coding-related questions within {% data variables.product.prodname_mobile %}.
|
||||
|
||||
@@ -28,6 +28,7 @@ Organization owners can set policies to govern how {% data variables.product.pro
|
||||
|
||||
* {% data variables.product.prodname_copilot_short %} in {% data variables.product.prodname_dotcom_the_website %}
|
||||
* {% data variables.product.prodname_copilot_chat_short %} in the IDE
|
||||
* Editor preview features
|
||||
* {% data variables.product.prodname_copilot_mobile_short %}
|
||||
* {% data variables.product.prodname_copilot_cli_short %} and {% data variables.product.prodname_windows_terminal %}
|
||||
* Suggestions matching public code
|
||||
|
||||
@@ -173,7 +173,8 @@ The following example uses JavaScript, however other languages will work similar
|
||||
## Next steps
|
||||
|
||||
{% data reusables.copilot.quickstart-nextsteps1 %}
|
||||
* **Use {% data variables.product.prodname_copilot_short %} like a pro** - Learn how to write effective prompts for {% data variables.product.prodname_copilot %}. For more information, see [Best practices for using {% data variables.product.prodname_copilot %} in VS Code](https://code.visualstudio.com/docs/copilot/prompt-crafting) in the {% data variables.product.prodname_vscode %} documentation.
|
||||
* **Use {% data variables.product.prodname_copilot_short %} like a pro** - Learn how to write effective prompts for {% data variables.product.prodname_copilot %}. For more information, see [Best practices for using {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vscode_shortname %}](https://code.visualstudio.com/docs/copilot/prompt-crafting) in the {% data variables.product.prodname_vscode %} documentation.
|
||||
* **Get familiar with {% data variables.copilot.next_edit_suggestions %}** - See [About {% data variables.copilot.next_edit_suggestions %}](/copilot/using-github-copilot/getting-code-suggestions-in-your-ide-with-github-copilot#about-next-edit-suggestions).
|
||||
{% data reusables.copilot.quickstart-nextsteps2 %}
|
||||
|
||||
{% endvscode %}
|
||||
|
||||
@@ -13,7 +13,7 @@ versions:
|
||||
|
||||
* **Access to {% data variables.product.prodname_copilot %}**. See [AUTOTITLE](/copilot/about-github-copilot/what-is-github-copilot#getting-access-to-copilot).
|
||||
* **{% data variables.product.prodname_windows_terminal %} Canary installed**. For installation instructions, see [Installing {% data variables.product.prodname_windows_terminal %} Canary](https://github.com/microsoft/terminal?tab=readme-ov-file#installing-windows-terminal-canary).
|
||||
* **GitHub Copilot connected to Terminal Chat**. See [AUTOTITLE](/copilot/quickstart?tool=windowsterminal).
|
||||
* **{% data variables.product.prodname_copilot %} connected to Terminal Chat**. See [AUTOTITLE](/copilot/quickstart?tool=windowsterminal).
|
||||
|
||||
If you have access to {% data variables.product.prodname_copilot %} via your organization or enterprise, you cannot use {% data variables.product.prodname_copilot_short %} in {% data variables.product.prodname_windows_terminal %} if your organization owner or enterprise administrator has disabled {% data variables.product.prodname_copilot_cli_short %}. See [AUTOTITLE](/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-github-copilot-features-in-your-organization/managing-policies-for-copilot-in-your-organization).
|
||||
|
||||
|
||||
@@ -207,6 +207,11 @@ Alternatively, you can show alternate suggestions by pressing <kbd>Alt</kbd>+<kb
|
||||
|
||||
This guide demonstrates how to get coding suggestions from {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vscode %}. To see instructions for other popular coding environments, use the tool switcher at the top of the page.
|
||||
|
||||
{% data variables.product.prodname_copilot_short %} in {% data variables.product.prodname_vscode_shortname %} provides two kinds of suggestions:
|
||||
|
||||
* **Code completions**. {% data variables.product.prodname_copilot_short %} offers coding suggestions as you type. You can also describe something you want to do using natural language within a comment, and {% data variables.product.prodname_copilot_short %} will suggest the code to accomplish your goal.
|
||||
* **{% data variables.copilot.next_edit_suggestions_caps %} ({% data variables.release-phases.public_preview %})**. Based on the edits you are making, {% data variables.product.prodname_copilot_short %} will predict the location of the next edit you are likely to make and suggest a completion for it.
|
||||
|
||||
The examples in this guide use JavaScript, however other languages will work similarly. {% data reusables.copilot.supported-languages %}
|
||||
|
||||
## Prerequisites
|
||||
@@ -300,6 +305,26 @@ Alternatively, you can use a keyboard shortcut to accept the next word of a sugg
|
||||
|
||||
If you want to accept the next line of a suggestion, you will need to set a custom keyboard shortcut for the command `editor.action.inlineSuggest.acceptNextLine`. For more information on setting custom keyboard shortcuts, see [AUTOTITLE](/copilot/configuring-github-copilot/configuring-github-copilot-in-your-environment).
|
||||
|
||||
## About {% data variables.copilot.next_edit_suggestions %}
|
||||
|
||||
> [!NOTE] {% data variables.copilot.next_edit_suggestions_caps %} is currently in {% data variables.release-phases.public_preview %} and is subject to change.
|
||||
|
||||
Inline suggestions autocomplete code, but many development tasks involve editing existing code. {% data variables.copilot.next_edit_suggestions_caps %} assists with edits both at the cursor and in other relevant parts of the code, helping maintain consistency and streamline changes.
|
||||
|
||||
{% data variables.copilot.next_edit_suggestions_caps %} predicts where and what edits may be needed based on ongoing changes. Suggestions may span a single symbol, an entire line, or multiple lines, depending on the scope of the potential change.
|
||||
|
||||
To enable {% data variables.copilot.next_edit_suggestions %}, see [AUTOTITLE](/copilot/managing-copilot/configure-personal-settings/configuring-github-copilot-in-your-environment#enabling-next-edit-suggestions).
|
||||
|
||||
### Navigating and accepting suggestions
|
||||
|
||||
You can navigate suggested code changes using <kbd>Tab</kbd>, making it easier to find the next relevant edit without manually searching through files or references. Press <kbd>Tab</kbd> again to accept a suggestion.
|
||||
|
||||
An arrow in the gutter indicates an available edit suggestion. Hover over the arrow to access the edit suggestion menu, which provides keyboard shortcuts and settings options. If an edit suggestion is outside the current editor view, the arrow will point up or down to indicate where the next suggestion is.
|
||||
|
||||

|
||||
|
||||
For more details and examples, see [Code completions with {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vscode_shortname %}](https://aka.ms/gh-copilot-nes-docs) in the {% data variables.product.prodname_vscode %} documentation.
|
||||
|
||||
{% endvscode %}
|
||||
|
||||
{% vimneovim %}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
* **Find out more about {% data variables.product.prodname_copilot_short %} code completion"** - See [AUTOTITLE](/copilot/using-github-copilot/using-github-copilot-code-suggestions-in-your-editor).
|
||||
* **Find out more about {% data variables.product.prodname_copilot_short %} code completion** - See [AUTOTITLE](/copilot/using-github-copilot/using-github-copilot-code-suggestions-in-your-editor).
|
||||
* **Find out more about {% data variables.product.prodname_copilot_chat %}** - See [AUTOTITLE](/copilot/github-copilot-chat/using-github-copilot-chat-in-your-ide){% ifversion fpt %}.{% endif %}{% ifversion ghec %} and [AUTOTITLE](/copilot/github-copilot-enterprise/copilot-chat-in-github/using-github-copilot-chat-in-githubcom).{% endif %}
|
||||
* **Learn how to write effective prompts** - See [AUTOTITLE](/copilot/using-github-copilot/prompt-engineering-for-github-copilot).
|
||||
|
||||
@@ -30,3 +30,7 @@ copilot_code-review_short: 'Copilot code review'
|
||||
## LLM models for Copilot
|
||||
copilot_claude_sonnet: 'Claude 3.5 Sonnet'
|
||||
copilot_gemini_flash: 'Gemini 2.0 Flash'
|
||||
|
||||
## Next edit suggestions in VS Code
|
||||
next_edit_suggestions: 'next edit suggestions'
|
||||
next_edit_suggestions_caps: 'Next edit suggestions'
|
||||
|
||||
Reference in New Issue
Block a user