Skip to content

Tip 2.41: How to browse code snippets and add new ones

June 1, 2013

“Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio“, courtesy of ‘Sara Ford’

Sara Ford’s Blog

All code snippets are found in the Code Snippets Manager. It is found at Tools–Code Snippets Manager. If you are using the General Development Settings, you can use Ctrl+K, Ctrl+B to bring up the dialog box.

In her opinion, the most useful aspect of this dialog box is to browse through your current snippets to learn what the shortcuts are to quickly insert the snippet into the editor.

Additionally, this is where you add (a directory of snippets) and import (a single snippet or multiple-selected snippets to a specified folder via the Import Code Snippet dialog box).

You should always check to see what type of snippets you are browsing by looking at the Language combo box found at the top of the dialog box. The Code Snippets Manager Language combo box is an MRU list, meaning that the last set of snippets you looked at (let’s say XML) will come up the next time you bring up the dialog box.

Sara Aside

For her as a tester, it was critical that she always confirmed where she was before using the dialog box; otherwise, she would end up logging incorrect bugs. Maybe you don’t need this warning, but old habits die hard.

Happy Programming! =)

Advertisements
Leave a Comment

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: