{"id":231772,"date":"2021-03-03T07:00:41","date_gmt":"2021-03-03T15:00:41","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/visualstudio\/?p=231772"},"modified":"2021-03-03T09:27:17","modified_gmt":"2021-03-03T17:27:17","slug":"repeated-edits-intellicode-suggestions-completion-list","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/repeated-edits-intellicode-suggestions-completion-list\/","title":{"rendered":"Frictionless repeated edits: IntelliCode suggestions in completion list"},"content":{"rendered":"<p>As a developer you make repetitive changes to your code all the time. In many cases you don&#8217;t even realize that you are doing a repetitive task or that Visual Studio IntelliCode suggestions can help you. <a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/making-repeated-edits-easier-with-intellicode-suggestions\" target=\"_blank\" rel=\"noopener\">IntelliCode suggestions<\/a> can already do the edit and find other locations where the same edit applies, making your life easier! But now, in <a href=\"https:\/\/visualstudio.microsoft.com\/downloads\/\" target=\"_blank\" rel=\"noopener\">Visual Studio 16.9<\/a> you can easily apply suggestions in a frictionless way all without breaking your editing flow. You can find IntelliCode suggestions right in your IntelliSense completion list, and can find and apply the same change at other locations.<\/p>\n<h2 id=\"apply-all-suggestions\">Completion list: how it works:<\/h2>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2021\/03\/Suggestions_completion-1.gif\"><img decoding=\"async\" class=\"alignnone wp-image-231806 size-full\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2021\/03\/Suggestions_completion-1.gif\" alt=\"Apply an IntelliCode suggestion from the completion list. Start typing, select the suggestion from the completion list, see preview and than apply the edit.\" width=\"1000\" height=\"260\" \/><\/a><\/p>\n<p>IntelliCode suggestions in the completion list blends naturally into your editing flow. The edit is added to the completion list in a non intrusive way. Now it is easy to find, and non-intrusively perform the repeated action. You can recognize the suggestion is coming from IntelliCode by the icon and star.<\/p>\n<h2 id=\"apply-all-suggestions\">Follow-up after apply<\/h2>\n<p>After you have applied an IntelliCode suggestion, if there are more locations the same edit would apply, IntelliCode shows a lightbulb to help you follow up. The lightbulb has actions to enable you to do the same edit at other locations.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2021\/03\/Suggestions_lightbulb-1.gif\"><img decoding=\"async\" class=\"alignnone wp-image-231807 size-full\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2021\/03\/Suggestions_lightbulb-1.gif\" alt=\"Use lightbulb action after an suggestion was applied\" width=\"1000\" height=\"260\" \/><\/a><\/p>\n<blockquote>\n<h3 id=\"how-it-works\">How it works<\/h3>\n<p>Under the hood, IntelliCode looks at each of your edits as you type. Using <a href=\"https:\/\/www.microsoft.com\/research\/group\/prose\/\">PROSE<\/a> (PROgram Synthesis by Example), IntelliCode synthesizes generalized edit scripts that take your code from the \u201cbefore editing\u201d state to the \u201cafter\u201d. The underlying technology is like the <a href=\"https:\/\/www.microsoft.com\/en-us\/research\/blog\/flash-fill-gives-excel-smart-charge\/\">Excel\u2019s Flash Fill feature<\/a> and is described in <a href=\"http:\/\/aka.ms\/repetitive-edits\">this research paper<\/a>.<\/p><\/blockquote>\n<h2 id=\"apply-all-suggestions\">New in preview: key bindings<\/h2>\n<p>Many of you prefer to work from the keyboard. IntelliCode suggestions now has key bindings for all the common actions in preview. <strong>Ctrl+Alt-.<\/strong> to apply directly, <strong>Ctrl+Alt-,<\/strong> to go to the next suggestion and <strong>Ctrl+Alt+\/<\/strong> will toggle an inline preview if there is a suggestion on the current line.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2021\/03\/Suggestions_key_binding-1.gif\"><img decoding=\"async\" class=\"alignnone wp-image-231805 size-full\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2021\/03\/Suggestions_key_binding-1.gif\" alt=\"Apply IntelliCode suggestions with key binding and go to next with key binding\" width=\"1000\" height=\"260\" \/><\/a><\/p>\n<p>You can help us to perfect the key bindings preview feature &#8211; enable it in Visual Studio 16.9 by setting <strong>Options-&gt;IntelliCode-&gt;Preview section-&gt; Suggestions key bindings to Enabled<\/strong>, try it out and send us feedback!<\/p>\n<h2>Putting it all together<\/h2>\n<p>Check out the video below to see how this works end-to-end:<\/p>\n<p><div style=\"width: 1920px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-231772-1\" width=\"1920\" height=\"1080\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2021\/03\/Blog-post3.Captions.mp4?_=1\" \/><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2021\/03\/Blog-post3.Captions.mp4\">https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2021\/03\/Blog-post3.Captions.mp4<\/a><\/video><\/div><\/p>\n<h2 id=\"let-us-know-what-you-think\">Let us know what you think!<\/h2>\n<div>We really like the detailed feedback we are getting from you! It helps us to prioritize the features we are working on and improve the experience. In the <u><a tabindex=\"-1\" title=\"https:\/\/visualstudio.microsoft.com\/vs\/preview\/\" href=\"https:\/\/visualstudio.microsoft.com\/vs\/preview\/\" target=\"_blank\" rel=\"noreferrer noopener\">Visual Studio preview<\/a><\/u> you can find even more future features we are working on with key bindings. Note that although IntelliCode is aware of the semantic structure of your code, sometimes suggestions do not match your intent. In these cases, please do let us know what you expected; it will help us provide better suggestions in the future. Please raise any issues via <u><a tabindex=\"-1\" title=\"https:\/\/docs.microsoft.com\/visualstudio\/ide\/how-to-report-a-problem-with-visual-studio?view=vs-2019\" href=\"https:\/\/docs.microsoft.com\/visualstudio\/ide\/how-to-report-a-problem-with-visual-studio?view=vs-2019\" target=\"_blank\" rel=\"noreferrer noopener\">Visual Studio \u201creport a problem\u201d<\/a><\/u>.<\/div>\n","protected":false},"excerpt":{"rendered":"<p>As a developer you make repetitive changes to your code all the time. In many cases you don&#8217;t even realize that you are doing a repetitive task or that Visual Studio IntelliCode suggestions can help you. IntelliCode suggestions can already do the edit and find other location where the same edit applies, making your life easier!<\/p>\n","protected":false},"author":11554,"featured_media":231999,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[155],"tags":[5,467,6782,1054,526,6781,12],"class_list":["post-231772","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-visual-studio","tag-csharp","tag-intellicode","tag-intellicode-suggestions","tag-ml","tag-productivity","tag-prose","tag-visual-studio"],"acf":[],"blog_post_summary":"<p>As a developer you make repetitive changes to your code all the time. In many cases you don&#8217;t even realize that you are doing a repetitive task or that Visual Studio IntelliCode suggestions can help you. IntelliCode suggestions can already do the edit and find other location where the same edit applies, making your life easier!<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/231772","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/users\/11554"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/comments?post=231772"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/231772\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media\/231999"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media?parent=231772"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=231772"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=231772"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}