Welcome back to the Mads Kristensen blog!
Just kidding... But I wouldn't be surprised if you might think that, given the number of times we highlight his work. Well it's all his fault! If he would just stop release cool extensions and stuff!
For example, today we're highlighting not one project of his, but two!
First we've got a cool HTML Snippet Pack (and you know how much I love snippets), secondly we've got a cool extension that helps you create and share your own Snippet Packs.
A snippet pack to make you more productive working with HTML.
Check out the contribution guidelines if you want to contribute to this project....
So what tags are included? Here's just the "content" snippets...
The really cool magic is that all these are done via one line of instruction;
Damn that Mads guy is smart!
Now what about creating and sharing your own Pack? Mad's has that covered too.
A Visual Studio project template for creating code snippet packs targeting any supported language. The snippet pack will be an extension you can share with your team or upload to the Visual Studio extension gallery.
See the change log for changes and road map.
- Create snippet pack extensions
- The snippet packs will work in Visual Studio 2012, 2013 and 2015.
How to use
Create a new project and select the Snippet Pack Extension.
That will create a VSIX project with the following structure:
Instructions will automatically show up on how to modify the snippets to your scenario.
To do that, open Snippets/snippets.pkgdef and follow the instructions found at the top of that file.
You can also have snippets for multiple languages. To do that, add an additional entry in the Snippets/snippets.pkgdef for the new language and add an additional folder with snippets targeting that language.
The Snippets folder contains a folder which has the name of your extension. You can name this folder whatever you want as long as you also change the name in snippets.pkgdef accordingly.
The .snippet must have a few properties set correctly for this to work.
Select one or more .snippet files and hit F4 to bring up the property grid. Set the following properties:
- Build action : Content
- Include in VSIX: True
Read more about the possibilities with code snippets on MSDN
Here are some packs created with this...
Here are some of the snippet packs made by this template:
And of course it's all open source;
Here’s a few more links you might find interesting:
- The Essential C# Snippet Source...
- One code snippet at a time [and more] with the Code Snippet Studio
- Saving your sanity with Snippets
- No waffling here... SideWaffle and a step-by-step guide to create Visual Studio Item Templates