Let users select the file name with running the 'Move to file' refactoring
See original GitHub issuemicrosoft/vscode#50486
Currently if the new file cannot be resolved, it would be newFile.ts
. Later I would have to manually update the filename. And in the case when updateImportsOnFileMove.enabled
is set to falsey, I’ll have to rename the references to the new files too.
Would be better to show an input for filename when no reasonable guess for the new file name exists.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:35
- Comments:12 (1 by maintainers)
Top Results From Across the Web
Let users select the file name with running the 'Move to file' ...
When you extract a function inside a file, you're asked for a function-name - you don't have to accept a default name, and...
Read more >Move type to matching file refactoring - Visual Studio ...
Move a type to a separate file with the same name. Right-click the type, select Quick Actions and Refactorings, and select Move Type...
Read more >Move Type to Another File refactoring - JetBrains Rider
Press Ctrl+Shift+R and then choose Move to Another File. Choose Refactor | Move to Another File from the main menu.
Read more >Refactoring source code in Visual Studio Code
Press F2 and then type the new desired name and press Enter. All usages of the symbol will be renamed, across files. Rename....
Read more >Rename or refactor files in Xcode
The safest way to rename files is to refactor the class name using Xcode's "Refactor" command. Using that command makes sure that your...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Since it’s been a while, I’d like to express my interest in having this feature. It would be a big help to me to kebab case new file names automatically.
I suggest one more request, that for quick refactoring and consistency, we could use a flag like - nameStrategy: [common name strategy] - to quick move function to a new file.
Also, i think for now, the new files are always located in the current folder aside as original file, could we set a different file path when using the filename open box?