Search code examples
htmlcssvisual-studiokeyboard-shortcutsshortcut

Is there a way to rename a file and upload it in all the others that call it?


I'm want to rename an html file in Visual Code, but this one is being called in several others. I want to know if there's a way to do this quickly. Some short cut that allows me to rename the file and instantle update this in the others .html .css or .js that calls it.


Solution

  • If it didn't update by itself, simply use the Replace in Files in the Edit (cmd-shift-r or ctrl-shift-r) and search for your old filename and replace with the new one. Include the extension if you included it in the code, that way you won't replace anything other than the filename. Also preview what will change before replacing everything.