Search code examples
webstorm

How can I quickly rename an open file in WebStorm?


The documentation for WebStorm says if you want to rename a file, do it in the Project Tool window. The problem is that finding a file in the Project Tool window is a hassle. If you start typing there to find the file, it won't be able to locate it unless it is in an expanded folder.

How can I easily rename a file in WebStorm?


Solution

  • There is no way to rename file right from the editor. Try Navigate/Select In.../Project view to open a file in Project Tool window and then use Refactor/rename in its right-click menu You can also enable the 'Autoscroll from source' Project tool window option to have the currently opened file auto-selected in the project tree

    Also, Refactor/rename is available in file right-click menu in the Navigation Bar if it's enabled (View/Navigation bar)