

Which default environment settings you choose the first time that you open Visual Studio-for example, General Development or Visual C#. Many shortcuts always invoke the same commands, but the behavior of a shortcut can vary based on the following conditions: You can identify keyboard shortcuts for Visual Studio commands, customize those shortcuts, and export them for others to use. If you know any cool shortcut that's cool, please let me know in comments.Applies to: Visual Studio Visual Studio for Mac Visual Studio Code It takes me to the original place where it defined. That's it! The reference window will be open.Īnd, if I'm going through code and want to know the definition of a member like Class, Variable, or a Method, I just click on it and hit F12. If I'm working on a gigantic codebase with multiple project files in a solution and I want to see all the references of a particular member like Class, Method, Variable, or Properties, I just click on that member and do Shift + F12. And also, if you are generating code snippets using the double-tab method, most of the code will auto-aligned. So, I just do Ctrl + K + D after writing the code and it is aligned. It is difficult to identify which part belongs to other parts of the code. Often writing code, it tricks me if my code is not aligned properly at all. So, I just useĬtrl + K + C for commenting and Ctrl + K + U for uncommenting. And this requires commenting-uncommenting the lines. Often writing code, I would like to make tweaks while testing. If I want to write a switch-case for all values present in a very tall enum (an enum with a huge list of entries), I just generate the switch-case template using my trick of Double-Tab, enter the enum name in the switch-on place and Click on the default keyword just once. If I want to write a class, a constructor, a for-loop, etc, I just type the keyword and hit TAB twice. But I'm going to list down the 5 shortcut keys that I use the most to increase my programming speed. Keyboard shortcuts are my favorite and there just so many I love.

They are there already, configured by default when you install a fresh copy of Visual Studio (any version).

And one more cool fact about these is you don't have to do anything in the settings to enable it. Using shortcut keys is not just cool but also increases productivity. I have been coding in C# on Visual Studio for almost around 8 years and I have realized using some of the keyboard short keys while writing the code is just so fast than using a mouse and going around options to click.
