AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Visual studio shortcut keys8/13/2023 How many times do you need to rename a variable, or simply change a certain repeated text or phrase throughout the entire file you’re working with? This keyboard shortcut makes it very simple. Select current lineĪ lot of times you need to select the entire current line your cursor is at. These keyboard shortcuts focus on making selections quickly. Instead of doing so with your machine’s mouse, doing it with the keyboard saves you time. The command palette allows you to search through the commands you can use and execute them.ĭuring development, you’ll most probably need to make selections in your code, whether for copying, cutting, or other purposes. With this keyboard shortcut, you can easily open the command palette. These commands can be related to out-of-the-box features or extension features. There are lots of commands you can execute in Visual Studio Code. This saves you from moving between the editor and the terminal and allows you to completely focus on the editor and the code. Visual Studio Code allows you to open a terminal window right inside the editor. This shortcut also allows you to create a new group if the editor group you select in the shortcut is higher than the number of groups currently open.ĭuring your development, you’ll most likely be using the terminal a lot. This keyboard shortcut makes it easier and faster to navigate between groups in the editor group history. Tab groups allow you to split up your tabs into groups, and each editor group takes a part of the screen. One of the nice features that Visual Studio Code provides is creating tab groups. Keep pressing tab to switch between tabs. When you have a lot of tabs open and you need to move between them, one easy way to do it is with this keyboard shortcut, which shows you the list of the tabs and lets you navigate between them and choose which one you want to open. So, this keyboard shortcut is handy to show or hide the sidebar whenever necessary. This keyboard shortcut makes it easier to get to the settings whenever necessary.Ī lot of times you need more space for the open file you’re working on. Visual Studio Code comes with a lot of features and settings that you can change to fit your needs. Even if you already know where the file is, it’s definitely handy to learn this keyboard shortcut to easily open files in your project. Searching for a specific file, especially as the project gets larger, can chew up a lot of time. If you know any cool shortcut that's cool, please let me know in comments.This section presents all the Visual Studio Code shortcuts that allow you to navigate different parts of the editor. 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.
0 Comments
Read More
Leave a Reply. |