是否可以在PHP / HTML和CSS中同时更改类名? [关闭]

I am looking a service or plugin for editor(doesn't matter which editor.) that changes class and id names at same time in both php/html file and scss file. We migrating our tagging methodology and I need to change one wordpress theme's class and id names. But as you know it is pain to change class in html and find the according class in scss then change it. Help me please.

You could use any number of editors with multiple document replacement functions, for example Sublime Text 3. It has a built-in Find/Where/Replace function where you can feed it:

  1. The text to find (as a string or regex). e.g. myCustomClass
  2. Where to find it (you can choose the documents to look in). e.g. <open files>
  3. The text to replace it with. e.g. myNewCustomClassName

To use the feature, open the documents you wish to edit and then goto Find > Find in Files... or use the keyboard shortcut CTRL + SHIFT + F.

Be weary of what text you are attempting to find and replace though, because if it is a generic class name like div then you will replace all classes with the name "div" AND you will also replace all HTML <div>'s as well.