重命名PHPStorm中的文件而无需重构 [英] Rename file in PHPStorm without refactoring

查看:189
本文介绍了重命名PHPStorm中的文件而无需重构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在PHPStorm中快速重命名文件名而无需重构?即使我刚刚创建了文件,PHPStorm仍需要花费很长时间在我的文件中搜索其用途.

How do I quickly rename a file name without refactoring in PHPStorm? Even after I've just created the file, PHPStorm takes a long time to search through my files for its usage.

推荐答案

我快速重命名文件的技术是单击文件名,然后按 Shift-F6 .将打开一个对话框,您可以立即输入文件的新名称,然后按回车/输入以完成重命名.

My technique for renaming files quickly is to single-click the file name and press Shift-F6. A dialog opens and you can immediately type the new name of the file and hit return/enter to complete the rename.

我觉得这项技术很直观,因为您不必将鼠标移到对话框窗口中,键入新名称,或单击任何内容进行确认.只要您所做的只是一个您知道安全的重命名,您只需键入并继续.

I find this technique intuitive because you don't have to move your mouse to the dialog window, type the new name, or click anything to confirm. As long as all you're doing is a rename that you know is safe, you just type it and go.

我也喜欢此功能,因为您仍然可以选择在更改之前快速预览更改.在某些情况下,当您重构某些东西可能会对应用程序的其余部分产生影响时,您仍然可以启用搜索引用"和/或在注释和字符串中搜索"来获得整个辣酱玉米饼馅. (默认情况下,我禁用了这些选项.)

I also like this feature because you still have the option of quickly previewing the changes before they're made. And on those occasions when you are refactoring something with possible implications to the rest of your app, you can still enable "Search for references" and/or "Search in comments and strings" to get the whole enchilada. (I have those options disabled by default.)

我同意您的观点,右键单击文件名,向下滚动到重构",选择重命名",然后输入新名称很麻烦,尤其是在启用安全检查的情况下.我发现PhpStorm开发人员似乎了解这些类型的问题,并且通常想到了一种更快的方式"来完成工作.

I agree with you that right-clicking the file name, scrolling down to Refactor, selecting Rename, and then entering the new name is cumbersome, especially if the safe checks are enabled. I find that PhpStorm developers seem to understand these types of issues and usually have thought of a "faster way" to do things as well.

这篇关于重命名PHPStorm中的文件而无需重构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆