简体   繁体   English

在 Sublime Text 中,如何查找和替换文件名

[英]In Sublime Text, how do I find and replace the file name

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.我想用人来代替它。

SideBarEnhancements ,在Find Advanced下有一个Mass Rename Selection...选项,可以批量重命名多个文件。

Menu: Find -> Find in Files...菜单: Find -> Find in Files...

Sublime is gonna open a new panel at the bottom, you just need to fill the fields. Sublime 会在底部打开一个新面板,你只需要填写字段。 Inside the field Where, you can, for example, look up only for .txt files:例如,在 Where 字段中,您可以仅查找 .txt 文件:

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

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.虽然有一个很棒的包叫做 SideBarEnhancements 可以从这个功能中受益。 I will definitely submit a feature request.我肯定会提交功能请求。

  • Install the SideBarEnhancements plugin安装SideBarEnhancements插件
  • Select the folder from side bar从侧边栏中选择文件夹
  • Right click and open the context menu右键单击并打开上下文菜单
  • From Find Advanced -> Mass Rename Selection... you can do this.Find Advanced -> Mass Rename Selection...你可以做到这一点。

在此处输入图片说明

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

相关问题 我如何使用〜作为分隔符使用sed查找和替换文本 - How do I find and replace text using sed using ~ as delimiter 在Sublime Text 3中,我可以将选择的do文件发送到Stata吗? - In Sublime Text 3, can I send a selection of a do file to Stata? 如何在Linux中从命令行替换文件中的此文本? - How do I replace this text in a file from the command line in Linux? 如何在Linux或Mac上的文件中一次替换多个文本? - How do I replace multiple text at once in a file on Linux or Mac? 如何在 Sublime Text 4 中打开 a.txt 表单终端? - How do I open a .txt form terminal in Sublime Text 4? 如何找到与套接字描述符关联的文件名? - How do I find the file name associated with a socket descriptor? 如何在文本文件中找到多个单词的计数? - how do i find the count of multiple words in a text file? 如何使用Elementary OS Luna授予文件Preferences.sublime-settings的写许可权并找到Sublime Text 3的此文件? - How I can grant write permission to the file Preferences.sublime-settings and locate this file of Sublime Text 3 using Elementary OS Luna? 如何正确配置Sublime Text 3作为git commit消息的默认文本编辑器? - How do I properly configure Sublime Text 3 as the default text editor for git commit messages? 如何防止Sublime Text更改文件的权限? - How to prevent Sublime Text to change the rights on a file?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM