Code Snippet Not Working

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • daokfella

    #1

    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

  • William LaMartin

    #2
    Re: Code Snippet Not Working

    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" <jjbutera@hotma il.comwrote in message
    news:1171652138 .673947.7470@l5 3g2000cwa.googl egroups.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
    >

    Comment

    • RobinS

      #3
      Re: Code Snippet Not Working

      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" <lamartin@tampa bay.rr.comwrote in message
      news:%232OLjArU HHA.3980@TK2MSF TNGP02.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" <jjbutera@hotma il.comwrote in message
      news:1171652138 .673947.7470@l5 3g2000cwa.googl egroups.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
      >>
      >
      >

      Comment

      Working...