简体   繁体   English

Resharper重命名功能类似于Visual Studio重命名 - 是否可能?

[英]Resharper rename feature similar to Visual Studio rename - is it possible?

When you're using Visual Studio refactoring features you may change the name of variable / class name, etc., press ctrl + . 当您使用Visual Studio重构功能时,您可以更改变量/类名称等的名称,按ctrl +。 and you're able to apply rename to this change. 并且您可以将重命名应用于此更改。 When you're using Resharper you have to say up front that you want to rename it (you have to press ctrl + r + r or f2). 当您使用Resharper时,您必须事先说明要重命名它(您必须按ctrl + r + r或f2)。 Is it possible in Resharper to change the name and then say you wanted full rename? 在Resharper中是否可以更改名称,然后说您想要完全重命名?

Thanks in advance for help! 在此先感谢您的帮助!

Yes. 是。 Starting from version 6.0 , you can change the name of a symbol declaration first, and press Alt+Enter to apply the in-place rename refactoring. 从版本6.0开始 ,您可以首先更改符号声明的名称,然后按Alt + Enter以应用就地重命名重构。 Similar in-place rename functionality is available for "Change signature" and "Move static members" refactorings. 类似的就地重命名功能可用于“更改签名”和“移动静态成员”重构。 Note that this only works when you're at symbol declarations. 请注意,这只适用于符号声明时。 If you want to rename a symbol from its usage, you still have to use the regular Rename refactoring available via F2. 如果要根据其用法重命名符号,则仍需使用F2提供的常规重命名重构。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM