CTRL+W should close the current tab as a default key bind
Sharon Talbot commented
As a person with small hands, I'd like to state that Ctl-F4 does not work for me. This is a common interaction, so I should be able to do it one-handed. Ctl-W is a standard elsewhere.
I disagree. It's a travesty that Ctrl+W has ever been used for this purpose. It's as if starting today, it slowly became common on linux or osx to use Ctrl+C to close apps. Ctrl+F4 has been the standard for a long time now, just as Ctrl+C has meant copy. I still remember when each app used a different keystroke for Copy, and now we're backsliding on the CloseWindow command. I wonder where this misfeature started? I suspect Netscape.
I think this would be a great default.
For those who don't know, you can middle click to close a tab.
Bruno Leonardo Michels commented
Ctrl+W is a pre-shortcut to access windows. I configured my VS to close a tab on Ctrl+W + Ctrl+W (double Ctrl W)
Ian William James Halliday commented
Hells yes! I make this change first thing every time I have a new install of VS.
Yes! Even Windows Explorer closes with CTRL+W...
Just to clear up a bit of the misinformation here, ctrl-w and ctrl-F4 *both* close the current tab in most browsers (including IE). CTRL-F4 is fairly common in Windows-only apps, but virtually every cross-platform app and many Windows-only ones, such as IE) allow you to close a tab with ctrl-W.
Personally, I prefer ctrl-W because (1) it's much easier to reach with one hand than ctrl-F4, and (2) a number of apps only react to ctrl-W. It'd be nice if VS followed this convention.
Michael Paterson commented
@Cesar this has long been a standard of tab-driven apps like web browsers.
This is a doubt of mine: Why Ctrl + W?
It has been Ctrl + F4 for ages closing MdiChilds, Tabs and so.
I noticed Notepad++ uses Ctrl + W and now this suggestion. Who invented this new "standard" and why "W" key? Just curious
Michael Paterson commented
Chris Wright commented
I think Ctrl + F4 is generally the accepted standard for closing tabs (this is true in IE and Opera and other tabbed browsers)
This is what Ctrl+F4 is for. IE tabs work the same way. This key combination dates back to the MDI windows. Ctrl+F4 to close mdi child or tab, Alt + F4 to close the app.
Bill Henning commented
First thing I do when setting up VS is to bind Ctrl+Q to my close tab command. That one hasn't ever conflicted with other VS keys for me, although I'm not sure if it would for Resharper or CodeRush.
Ruben Bartelink commented
Resharper and CodeRush use this for widen scope and it would be very annoying.
Adam Patridge commented
While it should definitely be a default (along with Ctrl+Shift+T), to get by until this is implemented, you can set up keyboard shortcuts yourself in VS2010: http://www.patridgedev.com/2012/02/14/closing-tabs-in-visual-studio-with-ctrlw/