visual-studio-code

How can I refactor file names in Visual Studio Code?


Is it possible to refactor the name of the files in a project and automatically update all the imports, without caring about breaking something each time a file name is changed?

In the same manner as in the JetBrains' products. You change the file name and everything is automatically updated.


Solution

  • Actually you can. Natively on Visual Studio Code (>= v1.28) with import path renaming:

    Renaming JavaScript import path in VS Code

    Or with some extension like Move TS.