Click here to Skip to main content
15,868,016 members
Articles / Web Development / ASP.NET
Tip/Trick

Most Useful VS2013 Tricks and Shortcuts!!

Rate me:
Please Sign up or sign in to vote.
4.90/5 (15 votes)
28 Dec 2014CPOL4 min read 27.9K   18   11
This tip elaborates few useful tricks and shortcuts of VS 2013 mainly for professional edition (You can find them with Ultimate version too).

Introduction

In this tip, we will walk through some important and time saving shortcuts of one of the world's most popular IDEs which is written in more than 70 billion lines of code, i.e., Visual Studio 2013 (Writing this tip with VS 2013 professional installed on my machine but you can find all these shortcuts available in Ultimate Edition too). shortcuts.

Using the Article

Obviously to try these shortcuts, you should have VS2013 (preferably Professional Edition) installed on your machine. Ok then, if you are having it, then you are set and it is time to start learning something new with practical examples.

Trick 1: Useful ToolBar Menu

Navigate through View -> Toolbars. New toolbar window will pop out. Here you can select items for which you love OneTouch access. (BTW, most of the time, I frequently check-in updated files in SC, so my favourite ToolBar is Source Control). To turn off toolbar, you can again select ToolBar option, so it will get unselected.

Image 1

Trick 2: Sign In Feature

It's located below the application restore toolbar. Most of the time, we are very used to your local machine development environment and sometimes, you have to go to any other folks machine and do some coding on that machine. Here, you feel a little bit uncomfortable as development environment settings (like font, color, theme, etc.) on this machine are not what you are comfortable with. No issues!! VS has sign functionality where you can sign in with your Microsoft account and once you are signed in, all your development environment customized settings will get stored to cloud and later on if you go to another machine and sign in with your account, all those settings will get applied to that environment. Happy coding on other machine too. :) BTW, by signing in, you can send feedback to Microsoft through feedback button next to notification.

Image 2

Trick 3: ScrollBar

Right click on Scrollbar, navigate to "ScrollBar Options" - Text Editor -> All languages -> Scroll Bars.

Go to Behavior section, select "Use map mode for vertical scroll bar". Here, you can select size for scrollbar like Narrow, Medium, Wide.

Image 3

On clicking OK, you will see:

Image 4

If you notice a new structure of scrollbar, you will notice:

  1. Increased size of scrollbar.
  2. On hovering scrollbar, code snippet in hovering area will get pop out, so you can see code in any area of code file just hovering that section.

Trick 4: Moving Lines without Cut+Paste!!

This trick comes in handy, where we want to relocate block of code. Instead of traditional way of Cut + Paste, we can:

  1. Select those lines to be moved.

    Image 5

  2. Press Alt + UpwardArrow, to move code upward.
  3. Press Alt + DownwardArrow, to move code downward.

Trick 5: Open WebPage in Multiple Browsers

One of the common requirements for Web Developers is to "develop a site supporting multiple browsers".

Once some changes are done, traditionally we can open site in different browsers one by one. Here comes a timesaving trick, we can easily browse site in more than one browser, through VS. You just need to do:

  1. Select Browse With option

    Image 6

  2. You get the following menu popped, select browsers you want to work with and click Browse.

    Image 7

Note: To refresh all browsers at same time, you can click reload button in option A.

Trick 6: Extract a Method

Code Refactoring!! is what developers love :) and VS is helping out to get that with less efforts :P How????

  1. Select code you want to move under method.
  2. Press ctrl + R,M. Notice VS has opened new method extraction dialog, with all dependencies as required parameters and return type (In my case, my method requires HotelDetail and HttpClient to work and returns HotelDetail. Who cares!!! VS has already taken care of that :) ). Just put the name you want and your method is created!!

    Image 8

Here comes one more trick in my mind, you might be knowing it. It's called "Surrounds With". With this, you can surround code block with if, try/catch, do, while, using, etc., just by selecting block, and press Ctrl + K,S and selecting whatever clause you want.

Trick 7: See Method Definition without Navigating to it

Most of the time, we have to navigate through lots of methods, during debugging causing frustration. To ease this, here is one more trick where you can see method definition without navigating to it and for this instead of using traditional F12, just use Alt + F12.

Image 9

Points of Interest

Once you learn this, hope you will have fun using it in daily coding and learn more tricks and features afterwards. This was just the tip of the iceberg, there are lot of useful features you can find over the internet.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
QuestionNice article . But Point 7 is not working in my visual studio. Pin
k10ketan8-Sep-16 21:57
k10ketan8-Sep-16 21:57 
QuestionTrick 7 is much help! Pin
Cheung Tat Ming12-Apr-15 5:50
Cheung Tat Ming12-Apr-15 5:50 
GeneralThanks Pin
vishwajeetrkale17-Mar-15 23:56
professionalvishwajeetrkale17-Mar-15 23:56 
QuestionHow to use VS2013 offline for more than 30 days ? Pin
fredatcodeproject29-Dec-14 2:08
professionalfredatcodeproject29-Dec-14 2:08 
QuestionThanks for this useful tricks Pin
vishwajeetrkale28-Dec-14 23:03
professionalvishwajeetrkale28-Dec-14 23:03 
GeneralMy vote of 3 Pin
Klaus Luedenscheidt28-Dec-14 19:39
Klaus Luedenscheidt28-Dec-14 19:39 
GeneralRe: My vote of 3 Pin
Pritam Deshmukh28-Dec-14 21:32
Pritam Deshmukh28-Dec-14 21:32 
QuestionThank you for trick number 7! Pin
MathieuDSTP28-Dec-14 5:04
MathieuDSTP28-Dec-14 5:04 
AnswerRe: Thank you for trick number 7! Pin
Pritam Deshmukh28-Dec-14 18:17
Pritam Deshmukh28-Dec-14 18:17 
thanks
QuestionThanks . Pin
Eng Kerollos Adel28-Dec-14 3:37
Eng Kerollos Adel28-Dec-14 3:37 
AnswerMessage Closed Pin
16-Mar-17 22:03
Top Telugu super Cick Songs16-Mar-17 22:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.