Code Snippet Not Working

  • Thread starter Thread starter daokfella
  • Start date Start date
D

daokfella

Hi all,

I've created a code snippet in VS 2005 and saved it in the proper
snippet folder. When I right-click and select Insert Snippet, I
navigation to My Code Snippets and it shows my snippet. However, when
I click my snippet, nothing happens. Has anybody else experienced
this? Inserting the supplied snippets works just fine. However, no
snippet I create works even though it can be selected as a snippet
from the intellisense.

Jason
 
I find that I need to double-click on the snippet (both mine and the
supplied ones) to get it to insert. Are you only single-clicking? A
single-click just gets the description.
 
This is true, you must double-click on the snippt.

You can also attach a "shortcut" to your snippet. This is easy to do if you
are using the Snippet Editor. You can see the shortcuts when you are
displaying the snippets, and you can click once on one, and look at the
tooltip.

So what good is the shortcut, you ask? If you type in the shortcut and hit
tab in the code window, it will put in your snippet.

For example, for a read-only property, it's "propread". Type propread and
<tab> and it will put in the read-only property snippet. Pretty cool if you
ask me.

You can also bring up the snippet menu by typing ? and tab in the code
window.

Snippets are cooool. Good luck.

Robin S.
--------------------------------------
 
Back
Top