Compare DAX and M formulas in Visual Studio Code is really easy with the help of Power BI Sidetools. As it is possible to transfer DAX and M formulas from Power BI desktop to files and to open them in Visual Studio Code, it is possible to compare two files. That’s extremely useful in many cases.
Text and file search in Visual Studio Code is really powerful. There are different ways to search and replace. The only difficulty you will meet will be to choose among all of them.