Using VS Code Snippets with Resharper
Asked Answered
B

3

56

I am trying to use Code Contract's Code Snippets but since I turned Resharper back on it doesn't recognize them. On the other hand, it is recognizing some snippets I've implemented myself in the past.

Any ideia of what might be the problem? I'm specifically trying to use cr and ce, which I think, don't collide with any other snippets (at least from what I see in the intellisense).

I'm using R# 5 with VS 2010

Thanks

Bramlett answered 12/5, 2010 at 15:47 Comment(0)
A
132

Press CTRL+J then type your snippet shortcut... this is mentioned here on the Resharper site

Ascocarp answered 6/12, 2010 at 5:39 Comment(2)
+1 (wish it could be 1000). I hit many search results before landing here. Thank you!Dacron
That link is broken.Biauriculate
Z
17

This answer demonstrates another work around.

  1. Right-clicking in your code editor and selecting "Insert Snippet"

  2. CTRL+K,X

This is what I am using to use mvvmlight snippets.

Zing answered 21/9, 2010 at 3:5 Comment(0)
T
13

I have the same problem and would gladly see a solution. The snippets work even though they won't show up in the intellisense popup, so if you hit "cr"+tab you would probably get the snippet anyway.

There is a "workaround" though. If you go to open the ReSharper settings and Environment->IntelliSense->General and change from ReSharper to Visual Studio intellisense mode. This will make your snippets show as expected, however some of the resharper intellisense additions won't be available.

I've tried with the latest nightly build of ReSharper 5.1 and it's still not fixed, unfortunately.

Hope this helps.

Tell answered 7/6, 2010 at 18:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.