Skip to main content

Two productivity tricks in Visual Studio you need to be using

Up your productivity game by using these two tricks you probably didn't know existed in Visual Studio.

Bar chart depicting more productivity
Being more productive

F1 key

Starting with the best, the F1 key. You didn't know this key did something did you, well, you'll be surprised to know that the F1 key opens up a help page on whatever you have your cursor on. Don't know what a keyword means or does, don't know what the parameters of Parallel.ForEach are, hit F1.

A snippet of Startup.cs code from an asp.net core application
Use that F1 key!

Clicking the F1 key while your cursor is over the SameSiteMode as shown in the above screenshot, takes us to this page where we can learn more about the SameSiteMode.

The task list

For when you want to clean up your code base, open up the task list and get on to fixing those bugs! The task list opens a window that shows all instances of your //TODOs (as well as other symbols in your code). You can open this window by going to View > Task List or (ctrl + \, T).

Take this example.

Using the TODO token to show the task list working
An example of using //TODO in code

The blue highlighting on the TODO comment is coming from Resharper, and isn't going to show up unless you have it installed. There is a trial available if you'd like to give it a spin for 30 days.

If you don't like to type out TODO all the time, or perhaps you use a different convention, no matter. You can create your own tokens by following these steps.

What are some tricks you know?

Share with us in the comments.

Comments

  1. I use Ctrl + Comma a lot to navigate my code instead of going to Solution Explorer, I just type the name of class, enum, method, etc. I also use (Ctrl + M,O), (Ctrl + M,P), (Ctrl+M,H) a lot.

    ReplyDelete
    Replies
    1. Thank you for sharing that! Ctrl + T also acts as Ctrl + Comma in case you didn't know.

      Delete
  2. Hit Ctrl + Minus to get back to the previous spot in the code you have visited.

    ReplyDelete
  3. Ctrl-} will jump to the matching bracket, parenthesis, or even #directive (maybe other "pairs" of characters?). That helps me in a legacy code base with huge looping structures I'm trying to clean up.

    ReplyDelete
    Replies
    1. I'll definitely be using this one now, I didn't know this one existed. Thanks for sharing.

      Delete
  4. 1. Ctrl+. is invaluable for refactoring
    2. Ctrl+R+T to debug the current test method
    3. Ctrl+R+G to remove and sort usings

    ReplyDelete
    Replies
    1. Thanks for sharing! I like Ctrl + R + G - I didn't know that one existed. Ctrl + . is another frequently used shortcut.

      Delete
  5. In the HTML editor for lists I have discovered that the Tab key increases the level of lists (indentation) and the Back-tab key decreases it. In other words, if I create an unordered list and a list item then create another list item then I can make the second item a sublist by pressing the Tab key. This is much like the way that Expression Web works. The secret is that the item must be empty; the Tab key and the Back-tab key do not work for this if there is anything in the item.

    ReplyDelete

Post a Comment

Popular posts from this blog

UI redesigns are mostly a waste of time

To preface the article, I primarily work on, and prefer, back-end code. I've been involved in both web and software development for over 4 years now and worked with many front-end and back-end frameworks.



Before all of the UI designers that read this go out and riot and champion against me for saying UI redesigns are a waste of time, let me say that I do value design. I think at the bare minimum, a product or website needs to be usable, and if you possess a good eye and steady hand, you should feel compelled to create something that looks pleasing.



Just stop redesigning the UI all the time.

UI redesigns, in my opinion, are a waste of time 95% of the time. Let me explain further.

No one cares Come see our fresh new look! What about our new material design, come see! I'm sorry, but besides fixing the UI where it impacts the usability of your application, no one is raving about how a redesign makes the application any better.
People use applications because of their purpose, not be…

How to block online ads with the hosts file

Am I the only one who is skeptical clicking on ads I see online? Yes, I know it is the lifeblood of entrepreneurs, but I really don't care to view more than I have to. We all know the 7 +- 2 rule; we have a limit of the amount of information we can take in at a single time. It's a fact. We are not infinite in our abilities alone - let's just let the computers do the thinking for us.

While I recently tried to set up a more elegant solution, I wanted to share with you how you have the power to block ads (in case you didn't know already) and regain [more] control of what you are looking at online.
Extensions This is the easy answer, just install Adblock Plus (Chrome).

Adblock does it all for you. Ads? No more. It's really a golden bullet. However, if you want to grow as a developer, sometimes it pays to try and do things in a different way in order to learn how more things work under the hood.
Hosts file Do you remember that little file you may have heard about in you…