visual-studio 在 Resharper 中使用 VS Code 片段
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2820446/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Using VS Code Snippets with Resharper
提问by devoured elysium
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.
我正在尝试使用 Code Contract 的 Code Snippets,但由于我重新打开了 Resharper,它无法识别它们。另一方面,它正在识别我过去自己实现的一些片段。
Any ideia of what might be the problem? I'm specifically trying to use crand ce, which I think, don't collide with any other snippets (at least from what I see in the intellisense).
任何想法可能是什么问题?我特别想使用crand ce,我认为它不会与任何其他片段发生冲突(至少从我在智能感知中看到的)。
I'm using R# 5 with VS 2010
我在 VS 2010 中使用 R# 5
Thanks
谢谢
回答by ElusivDangerBoy
Press CTRL+Jthen type your snippet shortcut... this is mentioned hereon the Resharper site
按CTRL+J然后输入您的代码段快捷方式... Resharper 网站上提到了这一点
回答by vaughan
回答by mikeesouth
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.
我有同样的问题,很高兴看到解决方案。即使片段不会出现在智能感知弹出窗口中,它们也能工作,因此如果您点击“cr”+tab,您可能无论如何都会得到片段。
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.
不过有一个“解决方法”。如果您打开 ReSharper 设置和 Environment->IntelliSense->General 并从 ReSharper 更改为 Visual Studio 智能感知模式。这将使您的片段按预期显示,但是某些 resharper 智能感知添加将不可用。
I've tried with the latest nightly build of ReSharper 5.1 and it's still not fixed, unfortunately.
不幸的是,我已经尝试过 ReSharper 5.1 的最新夜间版本,但仍未修复。
Hope this helps.
希望这可以帮助。

