{"id":2293,"date":"2010-03-20T13:22:00","date_gmt":"2010-03-20T13:22:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/visualstudio\/2010\/03\/20\/tips-and-tricks-quickly-closing-documents\/"},"modified":"2019-02-14T15:39:39","modified_gmt":"2019-02-14T23:39:39","slug":"tips-and-tricks-quickly-closing-documents","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/tips-and-tricks-quickly-closing-documents\/","title":{"rendered":"Tips and Tricks: Quickly Closing Documents"},"content":{"rendered":"<p>In VS 2010, we made a design decision to move the \u201cX\u201d from the right side of the Tab Well&nbsp; to within each tab.&nbsp; <\/p>\n<p><strong><u>Before (VS 2008)<\/u><\/strong><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/image_4.png\"><img decoding=\"async\" title=\"image\" border=\"0\" alt=\"image\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2010\/03\/image_thumb_1-1.png\" width=\"278\" height=\"37\"><\/a> <\/p>\n<p><strong><u>After (VS 2010)<\/u><\/strong><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/image_2.png\"><img decoding=\"async\" title=\"image\" border=\"0\" alt=\"image\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2010\/03\/image_thumb-1.png\" width=\"300\" height=\"38\"><\/a> <\/p>\n<p>The majority of feedback around this change was positive, but, as with most UI changes, there has been&nbsp;a vocal group that preferred the older placement.&nbsp; When asked what they liked about the old placement, 99% of the time the response was, <em>\u201cI liked the ability to quickly close tabs by repeatedly clicking on the \u2018X\u2019 without moving my mouse.\u201d<\/em>&nbsp; <\/p>\n<p>I\u2019ll admit it: I used that feature quite a bit to quickly close tabs.&nbsp; That is, until I found out that there are better and <em>more efficient<\/em> ways to clean up the Tab Well.&nbsp; Once I discovered these, I never looked back.&nbsp; So, for this \u201cTips and Tricks\u201d article, I wanted to share some of those ways to quickly close documents.&nbsp; <\/p>\n<p>&nbsp;<\/p>\n<p><strong><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/image_8.png\"><img decoding=\"async\" title=\"image\" border=\"0\" alt=\"image\" align=\"right\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2010\/03\/image_thumb_3.png\" width=\"252\" height=\"399\"><\/a>#1:<\/strong> <strong>Window-&gt;Close All Documents<\/strong><\/p>\n<p>Under the Window menu is a handy command: <strong>Close All Documents<\/strong>.&nbsp; Clicking this will prompt you to save your work and will then close all documents that are currently open.&nbsp; Yes, this does affect more than just the documents in the Tab Well \u2013 floating documents are also closed.&nbsp; If you don\u2019t want to take your hands off the keyboard, simply press <strong>Alt+ W, L<\/strong>, to invoke the command (You can also assign it a keyboard shortcut under Tools-&gt;Options-&gt;Environment-&gt;Keyboard).<\/p>\n<p>&nbsp;<strong>#2: Ctrl+F4<\/strong><\/p>\n<p>Another handy shortcut is <strong>Ctrl+F4 <\/strong>which, on most machines, is bound to the command Window.CloseDocumentWindow.&nbsp; Pressing this keyboard combination will close the current document window that has focus.&nbsp; Therefore, if you want to quickly get rid of a number of items in your tab well, just keep pressing Ctrl+F4 and eventually they\u2019ll be gone.&nbsp; <\/p>\n<p><strong>#3: Right-Click-&gt;Close All But This<\/strong><\/p>\n<p>If you want to close all but one open file, simply right-click on the tab and select <strong>Close All But This<\/strong>.&nbsp; This will close all open documents (floating included) except the tab you\u2019ve right-clicked on.&nbsp; <\/p>\n<p><strong>#4: Middle Click<\/strong><\/p>\n<p>For those that prefer to use the mouse instead of the keyboard, there\u2019s still a quick way to close tabs: <strong>the middle click<\/strong>.&nbsp; This shortcut actually works in a number of <a href=\"http:\/\/www.microsoft.com\/windows\/internet-explorer\/default.aspx\">other<\/a> <a href=\"http:\/\/windows.microsoft.com\/en-us\/windows7\/products\/features\/windows-taskbar\">popular<\/a> <a href=\"http:\/\/www.mozilla.com\/en-US\/firefox\/ie.html\">applications<\/a> as well.&nbsp; Simply place your mouse on the tab well and middle click to close the tab.&nbsp; You can keep your mouse in the first spot and click away.<\/p>\n<p>I\u2019m sure there are other ways to close documents, but these are some of my favorite.&nbsp; Hopefully you\u2019ll find these shortcuts useful.&nbsp; Please add any of your favorites that I missed to the comments.<\/p>\n<table border=\"0\" cellSpacing=\"0\" cellPadding=\"2\">\n<tbody>\n<tr>\n<td vAlign=\"top\">&nbsp;<\/td>\n<p>&lt;td =&quot;&#013;&#010;&#013;&#010;&#013;&#010;&#013;&#010;&#013;&#010;&#013;&#010;&#013;&#010;<\/p>\n<td><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/wespic_2.jpg\"><img decoding=\"async\" title=\"wespic\" border=\"0\" alt=\"wespic\" align=\"left\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2010\/03\/wespic_thumb-1.jpg\" width=\"86\" height=\"70\"><\/a><\/td>\n<td vAlign=\"top\"><strong>Weston Hutchins<\/strong> \u2013 Program Manager, Visual Studio Shell Team <br \/><strong>Short Bio<\/strong>: I started at Microsoft as an intern in 2005 and have been working in Visual Studio ever since.&nbsp; I\u2019m currently a PM on the VS Shell IDE team and work on the core IDE UI and services as well as the Extension Manager and <a href=\"http:\/\/visualstudiogallery.com\/\">http:\/\/visualstudiogallery.com<\/a> integration. Prior to my current duties, I was the SKU manager for the Visual Studio Express products.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>In VS 2010, we made a design decision to move the \u201cX\u201d from the right side of the Tab Well&nbsp; to within each tab.&nbsp; Before (VS 2008) After (VS 2010) The majority of feedback around this change was positive, but, as with most UI changes, there has been&nbsp;a vocal group that preferred the older placement.&nbsp; [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":255385,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[155],"tags":[137,287],"class_list":["post-2293","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-visual-studio","tag-html","tag-tips-and-tricks"],"acf":[],"blog_post_summary":"<p>In VS 2010, we made a design decision to move the \u201cX\u201d from the right side of the Tab Well&nbsp; to within each tab.&nbsp; Before (VS 2008) After (VS 2010) The majority of feedback around this change was positive, but, as with most UI changes, there has been&nbsp;a vocal group that preferred the older placement.&nbsp; [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/2293","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\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/comments?post=2293"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/2293\/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=2293"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=2293"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=2293"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}