How to insert a code snippet using a shortcut in XML editor of Visual Studio 2005

| No Comments | No TrackBacks

If you have tried to create or use code snippets in any of XML languages in Visual Studio 2005 you probably stumbled across the issue of using shortcuts. In C# or VB you just type code snippet's shortcut name and press Tab, it just works. In XML it doesn't :(. I've spent couple of hours reflecting into XML editor to see why it doesn't work (that was an interesting waste of time anyway) and when I just found out how it works I also found out (via Aaron Skonnard) it's documented at MSDN. RTFM, RTFM, RTFM.

Unfortunately inserting code snippets by shortcut name in XML editor of Visual Studio 2005 isn't as smooth as in C# or VB. Two more keystrokes: < and Esc. So press <, Esc, then shortcut and then Tab. That sucks, but I can live with it.

Related Blog Posts

No TrackBacks

TrackBack URL:

Leave a comment