{"id":240859,"date":"2022-12-20T08:00:25","date_gmt":"2022-12-20T16:00:25","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/visualstudio\/?p=240859"},"modified":"2022-12-20T10:05:50","modified_gmt":"2022-12-20T18:05:50","slug":"adding-new-files-just-got-a-lot-faster","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/adding-new-files-just-got-a-lot-faster\/","title":{"rendered":"Adding new files just got a lot faster"},"content":{"rendered":"<p>Have you ever felt like the New Item Dialog slows you down when you want to quickly create an empty file or a simple C# class? Browsing through a list of templates is sometimes necessary, but wouldn\u2019t it be great if Visual Studio could figure out which template you needed based only on the file name?<\/p>\n<p>If you answered yes, then you\u2019ll want to use the new Quick Add Dialog! To get started being more productive with less clicking, download the latest preview version of Visual Studio:<\/p>\n<p><div  class=\"d-flex justify-content-center\"><a class=\"cta_button_link btn-primary mb-24\" href=\"https:\/\/visualstudio.microsoft.com\/vs\/preview\/\" target=\"_blank\">Download Visual Studio 2022 17.5 Preview 2<\/a><\/div><\/p>\n<h2>Try out the Quick Add experience<\/h2>\n<p>Once you have the latest preview, give the new Quick Add feature a try by opening any solution. Right click on a folder or project and select <em>Add &gt; New Item&#8230;<\/em> or type Ctrl+Shift+A, just as in the past. Instead of the old New Item Dialog, you\u2019ll see the Quick Add Dialog!<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-240860\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/12\/word-image-240859-1.png\" alt=\"Screenshot of the Add New Item dialog being used to add a new class to a project.\" width=\"584\" height=\"664\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/12\/word-image-240859-1.png 584w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/12\/word-image-240859-1-264x300.png 264w\" sizes=\"(max-width: 584px) 100vw, 584px\" \/><\/p>\n<h3><strong>With the quick add dialog, you can:<\/strong><\/h3>\n<ol>\n<li>Add a new file without browsing through the template list: <code>MyClass.cs<\/code><\/li>\n<li>Create nested folders in a single operation: <code>Folder1\/Folder2\/, Folder1\/Folder2\/MyFile.cs<\/code><\/li>\n<li>Add files with any extension, or no extension at all: <code>File.MyExtension, README, .gitignore<\/code>\n<strong>TIP<\/strong>: Quick Add prepopulates a default extension for you, but you can hit Escape after opening the dialog to quickly clear the input box.<\/li>\n<li>Add multiple files at once: <code>File1.cs, File2.html<\/code> or <code>File.(cs, txt)<\/code>. The first example will create a File1.cs and File2.html. The second example will create a File.cs and a File.txt.<\/li>\n<\/ol>\n<p>You can also quickly switch between the Quick Add Dialog and New Item Dialog. Visual Studio will remember your choice, so you get the experience that suits your needs best! And if you\u2019d like to return directly to the Quick Add Dialog regardless of previous state, you can type Shift+F2. Keyboard shortcuts are configurable in <em>Tools &gt; Options &gt; Environment &gt; Keyboard<\/em>.<\/p>\n<ol>\n<li>Use \u201cShow All Templates\u201d to open the New Item Dialog\n<img decoding=\"async\" width=\"436\" height=\"147\" class=\"wp-image-240861\" style=\"font-size: 1rem;\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/12\/word-image-240859-2.png\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/12\/word-image-240859-2.png 436w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/12\/word-image-240859-2-300x101.png 300w\" sizes=\"(max-width: 436px) 100vw, 436px\" \/><\/li>\n<li>Use \u201cShow Compact View\u201d to open the Quick Add Dialog\n<img decoding=\"async\" width=\"550\" height=\"153\" class=\"wp-image-240862\" style=\"font-size: 1rem;\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/12\/word-image-240859-3.png\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/12\/word-image-240859-3.png 550w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/12\/word-image-240859-3-300x83.png 300w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/><\/li>\n<\/ol>\n<h2>We want your feedback!<\/h2>\n<p>Quick Add is inspired by the <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=MadsKristensen.AddNewFile64\">Add New File<\/a> extension. If you liked Add New File, we want you to love Quick Add! Quick Add adopts the same keyboard shortcut Add New File used, so you don\u2019t have to memorize a new one.<\/p>\n<p><img decoding=\"async\" width=\"603\" height=\"225\" class=\"wp-image-240863\" style=\"font-size: 1rem;\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/12\/word-image-240859-4.png\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/12\/word-image-240859-4.png 603w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/12\/word-image-240859-4-300x112.png 300w\" sizes=\"(max-width: 603px) 100vw, 603px\" \/><\/p>\n<p>If you\u2019re interested in this feature, install the latest preview version of Visual Studio and try it out! Note that we\u2019re still tuning the algorithm that chooses a template based on the project type and the file name you entered, so please let us know how we can improve it. Share your thoughts with us on the <a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Add-the-extension-Add-new-file-as-base\/1034939&quot; \\h HYPERLINK &quot;https:\/\/developercommunity.visualstudio.com\/t\/Add-the-extension-Add-new-file-as-base\/1034939\">Add the extension &#8220;Add new file&#8221; as baseline<\/a> ticket on Developer Community and vote by clicking thumbs-up\/thumbs-down in the dialog.<\/p>\n<p><div  class=\"d-flex justify-content-center\"><a class=\"cta_button_link btn-primary mb-24\" href=\"https:\/\/visualstudio.microsoft.com\/vs\/preview\/\" target=\"_blank\">Download Visual Studio 2022 17.5 Preview 2<\/a><\/div><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Have you ever felt like the New Item Dialog slows you down when you want to quickly create an empty file or a simple C# class? Browsing through a list of templates is sometimes necessary, but wouldn\u2019t it be great if Visual Studio could figure out which template you needed based only on the file [&hellip;]<\/p>\n","protected":false},"author":107898,"featured_media":255385,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[155],"tags":[6839,526,12,6815],"class_list":["post-240859","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-visual-studio","tag-developer-productivity","tag-productivity","tag-visual-studio","tag-visual-studio-2022"],"acf":[],"blog_post_summary":"<p>Have you ever felt like the New Item Dialog slows you down when you want to quickly create an empty file or a simple C# class? Browsing through a list of templates is sometimes necessary, but wouldn\u2019t it be great if Visual Studio could figure out which template you needed based only on the file [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/240859","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\/107898"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/comments?post=240859"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/240859\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media\/255385"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media?parent=240859"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=240859"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=240859"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}