How can I refactor file names in Visual Studio Code?

Sorry, but the answer is just simple: No, you can't.

At least not currently. It's up to the authors of the language modes to implement such things. There is support for the occasional variable refactoring here and there… And there are some additional extensions in the JavaScript space that support method extraction and stuff, but none of them handles filename refactoring.


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.