0

I have been using a class naming convention in HTML that I am not happy with. I want to go through and change my classes from "myClass" to the style "my-class". However, these classes appear in multiple files and going through and doing it manually would take a large amount of time.

The search and replace in Sublime Text takes quite a long time to go through all the files, and I would be changing the class names in my log files too (not sure if this is good practice).

Thanks in advance,

1 Answers1

0

I am going to ignore 'The search and replace in Sublime Text takes quite a long time to go through all the files' because that seems to be a statement and not a question. If you do have a question there you might want to ask it directly.

I am going to treat 'I would be changing the class names in my log files too' as though it were this question. 'Is there a way to change the .html files in my project without changing the log files?' If that is not your question then please ask the question you actually want answered.

So assuming 'Is there a way to change the .html files in my project without changing the log files?' is the question, then:

1 - Read this item Search in all files in a project in Sublime Text 3

As discussed in there you can limit the find (find-and-replace in your case) by using the modifiers in the middle field of the panel.

To limit the scope to files that end in .html add this *.html to the middle field (after the folder path). This will mean you only find in html files and ignore all other files types. I assume your log files are .txt or some file suffix other than .html.

jwpfox
  • 5,124
  • 11
  • 45
  • 42