{"id":232800,"date":"2021-06-17T12:00:27","date_gmt":"2021-06-17T19:00:27","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/visualstudio\/?p=232800"},"modified":"2025-05-16T08:03:18","modified_gmt":"2025-05-16T15:03:18","slug":"type-less-code-more-with-intellicode-completions","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/type-less-code-more-with-intellicode-completions\/","title":{"rendered":"Type less, code more with IntelliCode completions"},"content":{"rendered":"<p><center><div style=\"width: 640px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-232800-1\" width=\"640\" height=\"360\" autoplay preload=\"auto\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2021\/05\/VS2022IntelliCodeHighlightReelVSComAndBlog.mp4?_=1\" \/><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2021\/05\/VS2022IntelliCodeHighlightReelVSComAndBlog.mp4\">https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2021\/05\/VS2022IntelliCodeHighlightReelVSComAndBlog.mp4<\/a><\/video><\/div><\/p>\n<p><\/center>\nIn Visual Studio 2022 Preview 1 you can automatically complete code, up to a whole line at a time!<\/p>\n<p>Check out the video to see what it can do; it shows writing real code from a controller of the ASP.NET <a href=\"https:\/\/github.com\/dotnet-architecture\/eShopOnWeb\">eShopOnWeb<\/a> reference application.<\/p>\n<p>You can try this for yourself right now, on your own C# code!<\/p>\n<p><div  class=\"d-flex justify-content-center\"><a class=\"cta_button_link btn-primary mb-24\" href=\"https:\/\/aka.ms\/vs2022preview\" target=\"_blank\">Download Visual Studio 2022 Preview 1<\/a><\/div><\/p>\n<h3>Rich context gives great completions<\/h3>\n<p>IntelliCode now predicts the next chunk of code based on your current context, and presents it as an inline suggestion to the right of your cursor. If you like it, just hit tab-tab to accept it; otherwise simply keep on typing to adjust the completion further.<\/p>\n<p>To achieve this, IntelliCode uses a large scale transformer model, trained on around half a million public open-source repos from GitHub. It combines this with a <strong>rich knowledge of your coding context,<\/strong> taking cues from it including:<\/p>\n<ul>\n<li>Variable names and positions<\/li>\n<li>The sort of code you&#8217;re writing (e.g. the libraries you\u2019re using)<\/li>\n<li>Functions in nearby code<\/li>\n<li>The IntelliSense list &#8211; changing your selection in that list steers the model with extra context, so you can easily explore different completions to get to just the code you need<\/li>\n<\/ul>\n<p>It runs right on your local machine while you\u2019re editing, and covers many programming languages too. For our initial preview release we\u2019re supporting C#, but watch for more languages coming soon!<\/p>\n<h3>Let us know what you think!<\/h3>\n<p>IntelliCode has benefitted greatly from all the rich feedback we\u2019ve received from you \u2013 thank you! We hope you\u2019ll help us continue to improve by giving the newly enhanced completions a try and letting us know what you think.<\/p>\n<p>Please report any issues you see via <a href=\"https:\/\/developercommunity.visualstudio.com\/spaces\/8\/index.html\">Developer Community<\/a> and <a href=\"https:\/\/aka.ms\/vsicissues\">file feature requests<\/a> if you have them.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In Visual Studio 2022 Preview 1 you can automatically complete larger chunks of code, up to a whole line at a time; download the preview now.<\/p>\n","protected":false},"author":587,"featured_media":232819,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[155],"tags":[5,467,1054,526,12],"class_list":["post-232800","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-visual-studio","tag-csharp","tag-intellicode","tag-ml","tag-productivity","tag-visual-studio"],"acf":[],"blog_post_summary":"<p>In Visual Studio 2022 Preview 1 you can automatically complete larger chunks of code, up to a whole line at a time; download the preview now.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/232800","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\/587"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/comments?post=232800"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/232800\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media\/232819"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media?parent=232800"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=232800"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=232800"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}