Visual Studio

Visual Studio 2010 Keyboard Shortcut – Surround With

If you ever found yourself writing a bunch of code and then realized you should have put it inside a try…catch block or wrote a bunch of tracing code that are not meant to production release, this shortcut will help to cut down the seconds of your life you’re wasting navigating and typing these code.

Ctrl + K + S

First thing you have to do is select the code you want to put inside a block (surround with). Then, press this shortcut to open up a selection list #if…#endif, try…catch, etc that you commonly use. You just need to select one of the selection. And voila, code is surrounded.

Cheers – Sy


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s