You must use an advanced IDE, one of the best of all is Visual Studio, for you problem it can do this:
- Replace one line or a block of multiple lines of code
- Auto formatting of all page code
- Search and replace in all solution or only opened file or only specified file extensions
If you want try a IDE this is sure the best, it is for every code lenguage but the features of only HTML/CSS/JS are extremely good and cover all the needs more of all others IDE. You will need to combine it with these addons:
https://visualstudiogallery.msdn.microsoft.com/288a2b0f-1357-47b4-8215-1134c36bdf30
https://visualstudiogallery.msdn.microsoft.com/699CE302-B0D4-4083-BE0E-1682E873CEBF
https://visualstudiogallery.msdn.microsoft.com/3ea1c920-69c4-441f-9979-ccc2752dac56
https://visualstudiogallery.msdn.microsoft.com/f3b504c6-0095-42f1-a989-51d5fc2a8459