At work, I am a big fan of using snippets for common tasks. Out of laziness, I never re-created them for my home environment. Today though, I decided to do just that. I went into Visual Studio Gallery and searched for “snippet” and found this which got some good reviews:
This is pretty easy to use, and works great. There were a few things that weren’t obvious that I wanted to write down.
To use this, you do File –> New:
There is a new template category for Snippet Designer. Choose that, and it will open a snippet in an editor – for example:
When you want to create a “token”, simply type a $, then a name, and when you type the closing $, it will add it to the list in the bottom. You can then fill in the other details – like the tooltips and the default value.
Next, if you look in the Properties window (hit F4):
You can set the author, description, and most importantly the shortcut. The shortcut is what you actually see in the IDE. For example:
when I Tab-Tab to use that snippet in the editor, it gives me this template:
from here, I can obviously tab through all of the tokens that I set up in the snippet, and hit <Enter> to save the code.
Bottom line, this is a great, really simple snippet editor that works great. By the way, since the default location is already setup:
Visual Studio will see the snippet right away and you can start using it immediately. Anyhow, very cool little add-in – I recommend it!