Skip to main content
Paul1
Senior III
Oct 28, 2020 5:10 PM UTC
Solved

Replace across all code files in project

Is there a way to do a Find/Replace across all the code files in a project or group of projects?

i.e. change a variable name in a project or in all open projects?

Paul

This topic has been closed for replies.
TDK
TDKBest answer
Oct 28, 2020 6:28 PM UTC

Within a project you can do right click -> refactor -> rename... which is supposed to be smart about where it renames things based on the IDE's understanding of the code.

You can also do Search -> File -> Replace... which appears to do what you want, but I haven't tested it.

"If you feel a post has answered your question, please click ""Accept as Solution""."

4 replies

TDK
TDKBest answer
Oct 28, 2020 6:28 PM UTC

Within a project you can do right click -> refactor -> rename... which is supposed to be smart about where it renames things based on the IDE's understanding of the code.

You can also do Search -> File -> Replace... which appears to do what you want, but I haven't tested it.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Paul1
Paul1Author
Senior III
Oct 29, 2020 12:00 PM UTC

TDK,

The Search>File>Replace works great, can even select scope (project, workspace...)

Thank you

Always so fun switching IDEs.

Paul

TDK
Oct 29, 2020 2:46 PM UTC

> Always so fun switching IDEs.

I can hear the sarcasm. I think I'm on my 5th different IDE for STM32.

Seems like STM32CubeIDE is being supported. They have improved it quite a bit. Hopefully it doesn't get abandoned like so many before it.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Paul1
Paul1Author
Senior III
Oct 29, 2020 3:06 PM UTC

Only first IDE with ST/ARM for me. Used many different IDE's at different companies.