翻篇收录说明
翻篇网页快照

Next Edit Suggestions - GitHub Copilot in SQL Server Management Studio | Microsoft Learn

https://learn.microsoft.com/en-us/ssms/github-copilot/next-edit-suggestions

最近抓取:2026-12-06 02:10:05(北京时间)

最近内容变化:2026-11-30 05:06:48(北京时间)

这是最近一次有效抓取的文本快照,不含网页脚本、图片和动态交互内容。实际网页可能已更新。

访问原网页

页面简介

Learn how to use next edit suggestions for GitHub Copilot in SQL Server Management Studio (SSMS).

正文摘录

Table of contents Exit editor mode Reading mode Table of contents Add Edit Copy Markdown Print Use Next Edit Suggestions in SQL Server Management Studio Summarize this article for me The Next Edit Suggestions (NES) feature of GitHub Copilot uses your recent edits to anticipate the next edit that you might want to make, and the location of that edit. With this capability, Copilot suggests revisions to your code and comments. Inline completions are great at autocompleting a section of code. NES helps you stay in the logical edit flow by suggesting changes that are relevant to your current work. You can use the Tab key to quickly move through and accept suggestions. Suggestions might span one or more lines, depending on the scope of the potential change. Prerequisites Next Edit Suggestions for GitHub Copilot in SSMS supports the Transact-SQL (T-SQL) language. Install SSMS 22.2 or a later version with the AI Assistance workload. Sign in to your GitHub account with Copilot access. Use GitHub Copilot for free. Sign up and use AI to code faster and more efficiently. Enable Next Edit Suggestions To get started with GitHub Copilot NES, enable the feature in Tools > Options > All Settings > Text Editor > Code Completions > General. Select Copilot Next Edit Suggestions (Next-edit predictions from Copilot) in the Code Completions Providers section. Start using Next Edit Suggestions With Copilot Next Edit Suggestions (Next-edit predictions from Copilot) enabled, start writing T-SQL to see suggestions from NES. When the feature suggests a code edit, you can move to it by using the Tab key, and then accept it by using the Tab key again. You save time by quickly jumping to the next relevant edit, without needing to manually search through files or references yourself. An arrow in the gutter indicates whether an edit suggestion is available. Understand use cases NES is helpful in various scenarios by suggesting not only obvious repetitive changes, but also logical changes. Catch and correct mistakes NES helps with mistakes like typos. For example, it catches errors if you write SELCT instead of SELECT. Match a change in intent NES suggests changes to the rest of your code that match a change in intent. For example, if you update a query and add an alias for a table, NES shows suggestions that use the new alias. Refactor If you rename an object or variable once in a file, NES suggests updating it throughout the file. If you introduce a new name or naming pattern, the feature suggests updates to subsequent code to match. Hide NES You can hide suggestions from NES in SSMS and review them only when you choose. In Tools > Options > All Settings > Text Editor > Code Completions > General > Copilot Completions Model, select Collapse Next Edit Suggestions. Your edits still trigger NES, but when a suggestion is available, only the margin indicator appears in the gutter. This indicator points to the relevant line. The suggestion itself remains hidden until you choose to view it. To view a hidden suggestion, select the margin indicator or the Tab key and the suggestion appears. You can select the Tab key again to accept the suggestion or select the Esc key to dismiss it. After you accept a suggestion, any related suggestions appear automatically. Unrelated new suggestions remain hidden until you choose to view them. Related content Use Completions in SQL Server Management Studio Get started with GitHub Copilot in SQL Server Management Studio Troubleshoot GitHub Copilot in SQL Server Management Studio Feedback Was this page helpful? Yes No Need help with this topic? Want to try using Ask Learn to clarify or guide you through this topic? Suggest a fix? Last updated on 2026-05-19