How can I do a "find and replace a string" in the files of a project? Is there a standard, built-in way?
dired has a command
dired-do-find-regexp-and-replace, which is bound to Q by default. Keep in mind it uses regular expressions.
Like said, there are no standard ways of doing complicated things in emacs. Assuming project is defined as a git repository, you can do the following:
Install abo-abo's swiper/ivy/councel, https://github.com/abo-abo/swiper, and wgrep from ELPA. Bind the necessary commands to keys of your choice, especially
ivy-occur that is usually
C-c C-o and wgrep (
With a project file open in your active buffer, give command
councel-git-grepand type in the string you want to find in all project files.
ivy-occurkey to have the found lines in an new buffer.
Launch write grep (
wgrep) to do editing in the occur buffer.
Save and exit with