问题
I installed Resharper in VS2008 and it seems to have taken over some of the snippets I've come to rely on. For instance, prop, foreach, etc...
How can I tell Resharper to let VS2008 use its own snippets or at least not to overwrite snippets that already exist.
Better yet, is there a way to selectively tell Resharper which snippets it can overwrite and which it shouldn't?
I know about the Live Templates menu item that lets you pick and choose, but after deselecting 'foreach', for example, VS (or probably Resharper) treats it as a function. In other words, when I type 'fore' and hit tab for autocomplete, I end up with 'foreach()' instead of the snippet operation.
Thanks
回答1:
You can uncheck the ones that you don't want to use from Live Templates window. foreach template is under iterations group.
回答2:
I know I am late to the party but you can use snippet editor to copy your snippet then paste it into Resharper through the live template editor. The code appears to be compatible. I did that with several of mine and it works just fine.
回答3:
Since ReSharper 4 Visual Studio code snippets are imported into ReSharper as live templates. That means you can invoke any code snippet by pressing Ctrl+J.
All the scripts imported in Vs are available on this popup menu.
回答4:
Resharper is great in some respects, but in others it can be unbelievably frustrating when it just rides roughshod over years of muscle memory.
Options => Environment => IntelliSense => Completion Behavior => [Uncheck] "Replace Keywords with Live Templates"
来源:https://stackoverflow.com/questions/473956/how-to-get-resharper-to-use-visual-studios-snippets