In Visual Studio 2005, we introduced code snippets. The VS Editor Team Blog has a nice write-up on code snippets, if you want to learn more instead of waiting for a tip here and there from me =)
So we’re going to start the code snippet tip series with how to actually insert a code snippet. The keyboard shortcut is Ctrl+K, Ctrl+X. It is bound to the command Edit.InsertSnippet, in case your mileage varies, depending on your configuration settings.
I’m going to use C# for today’s tip, but this applies to all languages that support code snippets. When I invoke the Edit.InsertSnippet command, the code snippet insertion UI pops up. Did you know… (the real tip here) that the snippet picker allows for type-ahead scrolling. Note how I started typing "#re" on the line. (oh, the fun i had testing this… but i digress…)
Technorati tags: VS2005Tip, VS2008Tip