1
Vote

Setting a Shortcut to "sw" wont work

description

If I create a Snippet and define the Shortcut to be "sw", Intellisense will suggest "switch" but won't display my Snippet.
Setting the Shortcut to "sm" instead will work.

I have the same Issue with the Shortcut "aw" -> Intellisense will suggest "await" and wont show my Snippet.
Setting the Shortcut to "am" will work.

comments

buddybubble wrote Aug 1, 2012 at 1:04 PM

RESOLVED

ok sorry I found the solution:

When I saved the Snipped, I set the Snippet Language to C++. After saving, I saw the mistake and changed the language to C# and saved the snippet again.

The Snippet Designer did not move the snippet file to the C# folder -> Intellisense could not find it will in C# mode.

While this was my mistake, this behaviour is somewhat strange, though

mmanela wrote Aug 1, 2012 at 3:00 PM

I agree this is a strange behavior and would be a good change to make. There is some complexity in this change since snippet can live in many different folder and changing the language won't always mean you want to change the folder.

Here are my thoughts of how to make this better:
  1. If you have your snippet in one of the 'My Snippet' directories then automatically move it to the right folder.
  2. If the snippet is not in a 'My Snippet' directory show a alert box notifying the user of a possible issue.
Does that make sense?