Posts Tagged 'Shortcuts'

Top 5 Favorite Visual Studio Features

i-heart-vs

Visual Studio is such a powerful tool. I believe it is one of the major reasons why I enjoy .Net development over other platforms.

I thought I would share my top 10 favorite Visual Studio features with their keyboard shortcuts. The ones I couldn’t live without. Then I realized I could only come up with 5. This made me think I need to spend some time exploring the application I use more than any other application (Firefox not included) in my toolbox. So here are my top 5. Check back later for my “Top 5 Newly Discovered Features” post.

In no particular order…

-Find All (Ctrl+Shift+F)

Highlight a search term and you can search across the current document, all open documents, an entire solution or an entire project. Your results window will pop up and you’ll be able to view the line that contains the search term. Double click the line to go to it in code. I don’t know why everyone uses the classic find and next when this is just as easy but much more powerful.

-Comment\Uncomment selected lines (Ctrl+K, Ctrl+C), (Ctrl+K, Ctrl+U)

This has to be one of the most used features ever. It is so basic I wouldn’t consider an IDE without it an actual IDE. Without this you might as well be developing in notepad.

-Collapse\Open code (Ctrl+M, Ctrl+O), (Ctrl+M, Ctrl+L)

This one is really great. Assuming you aren’t using regions (which really can interfere with the usability\readability here) you can enter this shortcut chord (Ctrl+M, Ctrl+O) to collapse all properties and method details for a nice clean view of your class. Pressing (Ctrl+M, Ctrl+L) will open the whole class again or you can open individual section using the (+/-) toggle to the left.

-Refactor Rename (Ctrl+R, Ctrl+R)

Naming is huge in writing good code. Sometimes it just isn’t easy to find that perfect name when you first create something or a better name becomes apparent as you add additional items that have similar names. With this feature renaming a variable, method, property or class becomes 2 seconds of work. A lot of people may use search and replace but this actually uses the compiler to ensure it only renames what it should.

-Go to Definition (F12)

I remember when I first saw another developer use this and I couldn’t believe I had been working in VS for almost 6 months without knowing about it. Again it is so basic some may forget it is actually a feature but I’m sure if I captured my keyboard shortcuts it would be up at the top of the list of most used.

-ctrlShiftBryan