Just as VS2010 has gone RC, I've noticed that R# 5 has released a compatible build. Today I thought I'd highlight a simple, yet useful feature that doesn't currently receive much press: Custom Live templates can now use drop down lists.

As an example of how to take advantage of this feature, I'm going to cleanup my collection of unit testing templates. I have to write tests for MbUnit, NUnit, xUnit.NET and MSTest for various projects, and until now, I've used a separate template for each of them.

[caption id="attachment_827052" align="alignnone" width="274" caption="Remembering different shortcuts is a pain."][/caption]

With R# 5 I can have one template to rule them all, by using the 'Comma-delimited list of values' macro, we can supply... er... a comma-delimited list of values:

In the code editor, we now get a nice drop down to choose what value we want to use and viola!


Finally, a word about using this feature in VB - it doesn't seem to work as advertised - so hopefully that will get rectified before release!

kick it on DotNetKicks.com