-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support different moveToNewFile file name conventions #46514
Comments
This would be great if it could be supported! |
To save others time trying to find this issue. Related: microsoft/vscode#81835 |
This issue has been resolved. You can choose an arbitrary file name via "Move to File" then "Enter a new file path". move-to-file.mov |
I would not say it is completed. You need to type in the file name, but the original request was about adding file name conventions, so you can do refactor faster without typing. |
@BartaG512 Allowing the user to specify a file name seems like an elegant and satisfactory way to solve the problem I originally reported. Please feel free to open a new issue if the solution isn't satisfactory for your use case. |
This should be reopened as this does not fix the issue stated in the OP. |
I always want my filename to be the kebab case version of my function name. The solution as stated is hardly different than Move to new file -> rename. In fact, with autocomplete it's worse, as it's easy to accidentally move to an existing file with a similar name. |
That's exactly what I'm after @chad-schwab. Since I work a lot with react and want my components to be capitalised in code but kebab case in the file name. |
Re-opened, this is no longer an issue for me, but it seems it's still an issue for others. I'll let the company with more resources and time figure out what to do about this ๐ฎโ๐จ |
Suggestion
Support additional file naming conventions when refactoring.
๐ Search Terms
moveToNewFile move to file "move to a new file"
โ Viability Checklist
My suggestion meets these guidelines:
โญ Suggestion
Specify project file naming conventions in tsconfig.json and use the rule here.
๐ Motivating Example
Angular projects use the file name convention some-example.component.ts. The refactor action "Move to a new file" uses the convention SomeNewFile.ts. Ideally, there would be a way to specify the naming convention of the new file. In this case, some-new-file.ts would be the desirable outcome.
๐ป Use Cases
The text was updated successfully, but these errors were encountered: