Visual Studio 2015: Quick tips on Shortcuts and Features
In this article we will talk about features, shortcuts and tips for Visual Studio 2015 which will make you more comfortable and a hundred times more productive with the IDE you are working in.
Shortcuts
To go to a specific Tab or Location
Press Ctrl + Tab, and the following pop-up will be displayed and you can specify the tab you want to go to.
https://4.bp.blogspot.com/-01Cv0mZ-ndM/VrSlwnrGARI/AAAAAAAACt4/pWsE2ac7B9U/s320/Ctrl%252BTab.JPG
To bring the quick actions light bulb in view
Press Ctrl + .
To Bookmark a line of code
Press Ctrl + K
To increase font size, Press Ctrl + Shift + .
To decrease font size, Press Ctrl + Shift + ,
While intellisense, no doubt is an extremely helpful tool, but sometimes you wish you could peek at the code behind the intellisense window. Simply, hold down the Ctrl key to see through the code hidden behind it.
https://4.bp.blogspot.com/-ab0WzlJpt3g/VrSmGmESpfI/AAAAAAAACuM/ebDYPv3uv8Y/s320/navigation2.JPG
After holding down the Ctrl Key.
https://4.bp.blogspot.com/-yY_rqpLTmmY/VrSmJI_1CjI/AAAAAAAACuM/afGWsSsYTbM/s320/intellisense1.JPG
Formatting code:
To Format your code and to bring it back to order
Press Ctrl + K then Ctrl + D
Define Properties of a private field:
Write Prop and then press Tab Tab for the following syntax
https://1.bp.blogspot.com/-0hDQWosSeZY/VrSb7NMC3MI/AAAAAAAACtg/TwEqzek8MaI/s1600/propTab.JPG
And PropFull and then Tab Tab for the following syntax
https://2.bp.blogspot.com/-K-dIHWXP5MA/VrScbz4yquI/AAAAAAAACtk/ntn_Q4G0z_U/s1600/propFullTab.JPG
Peek definition by pressing Alt + F12 and Esc to close
To move a line or set of selected line, use Alt + Up Arrow/Down Arrow
Go to a specific line number Ctrl + G
Have you ever wished to select a piece of code vertically! Wish no more, simply hold down the Alt key and select text vertically.
To Comment code press, Ctrl + K, Ctrl + C
To Uncomment code press, Ctrl + K, Ctrl + U
For surround-with code snippets, use Ctrl + K, Ctrl + S
IDE Features
Task List : can be used to keep track of comments like TODO, UNDONE, HACK or even customized tokens. To open the task list go to View -> Task List
Lazy Code Snippets: allows you to drag and drop the selected code to toolbox and place it under one of the sections or create one of your own. Now this piece of code will be available in all of your projects and you won't have to retype it, a simple drag and drop as required will be enough.So, now you why it's called LAZY.
Quick Launch: is a search tool, but instead of searching through code, it searches through the visual studio itself.
Let's suppose you want to turn on the line numbers, but you can't find the option. All you have to do is type line numbers in the quick launch bar, which is situated at top right corner of the VS window and it will display all the results it could find after searching menus(@menu), most recently used(@mru), options(@opt), open document(@doc) and NuGet packages(@nuget)
https://4.bp.blogspot.com/-xX3S3SwZ2eY/VrTVCtWGC2I/AAAAAAAACvA/_ekzV7DUcRY/s400/Capture2.JPG
As you can see, the search result returns the location of line number, Options->Text Editor->All Lanuages->General.
4) Preview Tab: allows you to quickly glance at file without actually opening it in a new tab.<
https://1.bp.blogspot.com/-I3o6Y-i9ChI/VrTbUg7RjrI/AAAAAAAACvQ/W6zB8MbzCGM/s400/jsopn.JPG
However, if you decide to open the file, you can do that by clicking on the Keep Open icon which is on the left of the cross for closing the file.
Bonus Tips
- Display Number of Lines: Go to Tools > Options > Text Editor > All Languages > Line Numbers
- Offline Help: Go to Help > Set Help Preference > Launch in Help Viewer
- ** Feedback:** Next to the Quick Launch Bar is a feedback icon, which allows you rate product, send suggestions and report a problem.
https://3.bp.blogspot.com/-jIr-qlmGImI/VrTgEBfXpiI/AAAAAAAACvg/SZKztXcWBmI/s320/Capture.JPG
****