InfoQ

News

Snippet Editor for Visual Studio 2005/2008

Posted by Jonathan Allen on Nov 13, 2007

Community
.NET
Topics
Artifacts & Tools
Tags
Code Generation

Snippets are code templates that can be quickly accessed from the keyboard. They are not code generators per se, but rather just short cuts for common coding patterns. They support linked fields, so altering a variable name in one place will cause it to be altered throughout the snippet. The snippet will also automatically add any project references or import statements needed.

In addition to being a productivity aid, snippets serve as a training tool in Visual Basic. Snippets include instructions for tasks ranging from creating a property or new exception type through esoteric tasks like dialing a phone number using a modem connected to a serial port. To see a complete list of code snippets in VB, type ? then press tab. (It should be noted that C# also supports code snippets, but the built-in catalog is very limited.)

With the Snippet Editor, new code snippets can be created and existing ones edited to match the tasks and coding styles of each team. The snippets can then be sent as single files or packaged in a VSI. Currently there is no support for creating a shared repository for teams, but the possibility is there.

The snippet editor was originally released on GotDotNet. For reasons that are still not understood, Microsoft effectively deleted all of the content that was on the GotDotNet site when it was decommissioned. While some code was moved to CodePlex, the source for the Snippet Editor was not.

Bill McCarthy has recently brought back the snippet editor, source code and all, and added support for Visual Studio 2008. Express editions are also included for both versions.

Snipp Dogg by Jon Rogers Posted Apr 5, 2008 12:57 AM
  1. Back to top

    Snipp Dogg

    Apr 5, 2008 12:57 AM by Jon Rogers

    I found a better editor for snippets on CodePlex at www.codeplex.com/SnippDogg. Works great and is very easy to use. Hope this helps.

Educational Content

Brian Marick on 4 Challenges and 5 Guiding Values of Agile Software Development

Brian Marick takes us through a quick tour of the most important values and challenges to adopting Agile successfully (they aren't the typical challenges and values we hear in the community).

Are You a Software Architect?

The line between development and architecture is tricky. Does it exist at all? Is an ivory tower actually needed? There's a balance in the middle, but how do you move from developer to architect?

Agile – A Way of Life and Pragmatic Use of Authority

The word 'authority' sometimes produces an allergic response in hard-line agilists. Freedom and authority – both are bad if misused and both are good if used in right spirit for a noble cause.

Getting Started with Grails, Second Edition

"Getting Started with Grails" brings you up to speed on this modern web framework. Companies as varied as LinkedIn, Wired, and Taco Bell are all using Grails. Are you ready to get started as well?

Using ITIL V3 as a Foundation for SOA Governance

Those familiar with only ITIL V2 often scoff at the thought that ITIL could serve as a governance framework for SOA. With ITIL V3, the focus of the framework shifted towards service-orientation.

Adrian Colyer on AspectJ, tc Server and dm Server

SpringSource CTO Adrian Colyer discusses AspectJ, SpringSource's dm Server and tc Server products, OSGi and Scrum.

Adam Wiggins on Heroku

Heroku's Adam Wiggins talks about Rails, Background Jobs, Add-Ons, Ruby, and how Heroku manages to work around Ruby's inefficiencies using Erlang and other languages.

SOA as an Architectural Pattern: Best Practices in Software Architecture

For Grady Booch the foundation of a good architecture is patterns, SOA being just one of many patterns. In this Second Life presentation, Booch attempts to bring more clarity on what architecture is.