在崇高的文本中,我如何找到并替换文件名

时间:2021-03-02 07:36:33

Is there a way in sublime text where I can find a pattern and replace it with file names.

在崇高的文本中是否有一种方法,我可以找到一个模式并用文件名替换它。

For example, I have a bunch of file names that contain people.

例如,我有一堆包含人员的文件名。

I want to replace that with person.

我想用person代替。

3 个解决方案

#1


1  

Menu: Find -> Find in Files...

菜单:Find ->在文件中找到…

Sublime is gonna open a new panel at the bottom, you just need to fill the fields. Inside the field Where, you can, for example, look up only for .txt files:

崇高将在底部打开一个新的面板,你只需要填满字段。例如,在该字段中,您可以只查找.txt文件:

Find: People
Where: C:\Temp, *.txt
Replace: Person

#2


1  

in SideBarEnhancements there is an option to Mass Rename Selection... under Find Advanced to batch rename multiple files.

在sidebarenhancement中,你可以选择批量重命名选择……在查找高级批量重命名多个文件。

#3


0  

No you cannot do a find and replace on a filename. Although there is a great package called SideBarEnhancements which would benefit from this feature. I will definitely submit a feature request.

不,你不能在文件名上做查找和替换。虽然有一个很棒的包叫做sidebarenhancement,它会从这个特性中获益。我一定会提交一个功能请求。

#1


1  

Menu: Find -> Find in Files...

菜单:Find ->在文件中找到…

Sublime is gonna open a new panel at the bottom, you just need to fill the fields. Inside the field Where, you can, for example, look up only for .txt files:

崇高将在底部打开一个新的面板,你只需要填满字段。例如,在该字段中,您可以只查找.txt文件:

Find: People
Where: C:\Temp, *.txt
Replace: Person

#2


1  

in SideBarEnhancements there is an option to Mass Rename Selection... under Find Advanced to batch rename multiple files.

在sidebarenhancement中,你可以选择批量重命名选择……在查找高级批量重命名多个文件。

#3


0  

No you cannot do a find and replace on a filename. Although there is a great package called SideBarEnhancements which would benefit from this feature. I will definitely submit a feature request.

不,你不能在文件名上做查找和替换。虽然有一个很棒的包叫做sidebarenhancement,它会从这个特性中获益。我一定会提交一个功能请求。