查找和替换所有文件中的文本 rstudio
Find and replace text in all files rstudio
我想知道为什么 Rstudio 中仍然没有搜索当前项目(包)中的所有文件并替换给定文本的功能!?或者也许有一个我不知道!
ctrl+shift+f
只在所有文件中查找,不进行替换。
ctrl+shift+j
(或ctrl+f
)在当前文件中查找并替换。
我能找到的最好的是 this,它是 2014 年的未决问题:
Thanks for the feedback. We've got this as a feature request and I'll chalk up another request for this.
这是与增强相关的 Rstudio Github 问题:
https://github.com/rstudio/rstudio/issues/2066
请随意投票(竖起大拇指)问题以引起更多关注!
我写了一个小的 RStudio 插件来替换多个文件,在这个功能被包含在一些更新的 RStudio 版本中之前可以使用它。这是屏幕截图:
包在我的blog post.
中有简要介绍
现在 1.3 版的 RStudio 可以做到这一点。您可以在 https://blog.rstudio.com/2020/03/17/rstudio-1-3-the-little-things/.
了解更多信息
根据我在 this feature request, it is already available (this was the pull) 上看到的内容。
RStudio 称之为 Global Replace:
RStudio has long had a Find in Files feature, which makes it possible
to easily locate text in your project. If you’re not familiar with
this feature, try it out: press Ctrl+Shift+F (MacOS: Cmd+Shift+F), or
choose Find in Files… from the Edit menu.
In RStudio 1.3, it’s now possible to replace the text you found:
After you’ve done a search, switch to Replace view via the toggle,
enter your new text, and click Replace All. It works with regular
expressions, too.
为了测试它,在 Windows 的 RStudio 中,当按下 CTRL
+SHIFT
+F
时,它会打开以下
并且可以在以下文件中搜索
谨记:
You should be aware however that while we do hang out on the community
site occasionally, the best place to make your request heard is on our
Github issue tracker. (Source)
我想知道为什么 Rstudio 中仍然没有搜索当前项目(包)中的所有文件并替换给定文本的功能!?或者也许有一个我不知道!
ctrl+shift+f
只在所有文件中查找,不进行替换。
ctrl+shift+j
(或ctrl+f
)在当前文件中查找并替换。
我能找到的最好的是 this,它是 2014 年的未决问题:
Thanks for the feedback. We've got this as a feature request and I'll chalk up another request for this.
这是与增强相关的 Rstudio Github 问题:
https://github.com/rstudio/rstudio/issues/2066
请随意投票(竖起大拇指)问题以引起更多关注!
我写了一个小的 RStudio 插件来替换多个文件,在这个功能被包含在一些更新的 RStudio 版本中之前可以使用它。这是屏幕截图:
包在我的blog post.
中有简要介绍现在 1.3 版的 RStudio 可以做到这一点。您可以在 https://blog.rstudio.com/2020/03/17/rstudio-1-3-the-little-things/.
了解更多信息根据我在 this feature request, it is already available (this was the pull) 上看到的内容。
RStudio 称之为 Global Replace:
RStudio has long had a Find in Files feature, which makes it possible to easily locate text in your project. If you’re not familiar with this feature, try it out: press Ctrl+Shift+F (MacOS: Cmd+Shift+F), or choose Find in Files… from the Edit menu.
In RStudio 1.3, it’s now possible to replace the text you found:
After you’ve done a search, switch to Replace view via the toggle, enter your new text, and click Replace All. It works with regular expressions, too.
为了测试它,在 Windows 的 RStudio 中,当按下 CTRL
+SHIFT
+F
时,它会打开以下
并且可以在以下文件中搜索
谨记:
You should be aware however that while we do hang out on the community site occasionally, the best place to make your request heard is on our Github issue tracker. (Source)