I am wondering why, still, there is not a feature in Rstudio to search all files in the current project (package) and replace a given text!? Or maybe there is one and I am not aware of!
ctrl+shift+f
only finds in all files without replacement.
ctrl+shift+j
(or ctrl+f
) finds and replaces in the current file.
Choose Replace in files from the list of results. On the Edit menu, expand Find and Replace. Choose Replace in Files.
RStudio supports finding and replacing text within source documents: Find and replace can be opened using the Ctrl+F shortcut key, or from the Edit -> Find... menu item.
Most people are familiar with command-f for searching through files; shift-command-f launches a window to search through files. You can also customize the search type for certain extensions, or to exclude stuff like . html or . md which hides duplicate results if you work with a lot of knitr.
I wrote a small RStudio Addin to replace in multiple files, which can be used until this functionality is included in some newer RStudio version. Here is a screenshot:
The package is briefly described in my blog post.
This is now possible with the 1.3 version of RStudio. You can learn more at https://blog.rstudio.com/2020/03/17/rstudio-1-3-the-little-things/.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With