470,614 Members | 1,500 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,614 developers. It's quick & easy.

Code Snippet Not Working

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

Feb 16 '07 #1
2 1814
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.

"daokfella" <jj******@hotmail.comwrote in message
news:11********************@l53g2000cwa.googlegrou ps.com...
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

Feb 17 '07 #2
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
<taband 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.
--------------------------------------
"William LaMartin" <la******@tampabay.rr.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>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.

"daokfella" <jj******@hotmail.comwrote in message
news:11********************@l53g2000cwa.googlegrou ps.com...
>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


Feb 20 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Eric Marthinsen | last post: by
1 post views Thread by Default | last post: by
18 posts views Thread by Joe Fallon | last post: by
17 posts views Thread by Mark | last post: by
reply views Thread by Paulo | last post: by
4 posts views Thread by tshad | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.