question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Let users select the file name with running the 'Move to file' refactoring

See original GitHub issue

microsoft/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:open
  • Created 5 years ago
  • Reactions:35
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

20reactions
hcharleycommented, Aug 4, 2021

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.

8reactions
sevenryzecommented, Sep 30, 2018

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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found