How to get Resharper to use Visual Studio's snippets

狂风中的少年 提交于 2019-12-22 02:04:31

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!