Overview
It’s common today to use the CTRL+W
in various applications including most web browsers.
If you’ve used Visual Studio you’ve probably noticed that this keyboard shortcut does not work when trying to close the currently opened tab.
In this article, I’ll show you how you can easily configure Visual Studio to close the currently opened tab.
Configuration
Ok, lets get started …
Here’s how you can configure the keyboard shortcut in Visual Studio:
- Navigate to
TOOLS > OPTIONS > KEYBOARD
- Add
CTRL+W
global shortcut toWindow.CloseDocumentWindow
- Remove the
CTRL+W
shortcut forEdit.SelectCurrentWord
Final Thoughts
I hope you’ve found this quick Visual Studio tip to be useful. If you have found alternative ways to configure this, please feel free to share them in the comments below.
Happy coding 🙂
Latest posts by Shane Bartholomeusz (see all)
20th December 2022 at 5:47 pm
Thanks for the clear explanation!
I cannot believe we still need to do this. It also seems that people are (still) forgetting that this shortcut exists and should exist. I can’t understand why someone would want to use ctrl+f4 instead. This kind of shortcut needs to be close to the home row for any power user to quickly work with any kind of text editing. (Which is what coding amounts to, obviously)
20th December 2022 at 8:12 pm
Totally agree with you Joep!