简体   繁体   English

"Visual Studio Code 和 Angular:如何重命名文件夹和组件类?"

[英]Visual Studio Code and Angular: how do I rename folders and component class?

I am using Visual Studio Code<\/strong> for my huge Angular-4<\/strong> project.我正在为我的大型Angular-4<\/strong>项目使用Visual Studio Code<\/strong> 。 From time to time I copy components entirely and then modify them.有时我会完全复制组件然后修改它们。 Components are organized in folders so i end up renaming multiple files and class names.组件被组织在文件夹中,所以我最终重命名了多个文件和类名。

Is there an extension that does this all at once?是否有一个扩展程序可以一次完成所有这些操作?

my-component-name\
my-component-name\my-component-name.component.cs
my-component-name\my-component-name.component.html
my-component-name\my-component-name.component.css
export class MyComponent

As per my experience with VSCode, the only way is to reach out to the master Project folder and rename the files/ folders as per your requirement manually while the IDE is closed.根据我对 VSCode 的经验,唯一的方法是在 IDE 关闭时访问主项目文件夹并根据您的要求手动重命名文件/文件夹。 Refresh the folder and CTRL+O the folder thereafter from VSCode.之后从 VSCode 刷新文件夹并 CTRL+O 文件夹。 This has worked for me.这对我有用。

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

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