Skip to content
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

Refactor move file #6487

Closed
mhegazy opened this issue Jan 14, 2016 · 27 comments
Closed

Refactor move file #6487

mhegazy opened this issue Jan 14, 2016 · 27 comments
Labels
API Relates to the public API for TypeScript Domain: Refactorings e.g. extract to constant or function, rename symbol Fixed A PR has been merged for this issue Needs Proposal This issue needs a plan that clarifies the finer details of how it could be implemented. Suggestion An idea for TypeScript

Comments

@mhegazy
Copy link
Contributor

mhegazy commented Jan 14, 2016

From @tamascsaba on December 7, 2015 15:15

I want to move file to another location but there is no way :(
like: https://www.jetbrains.com/idea/help/move-refactorings.html

Copied from original issue: microsoft/TypeScript-Sublime-Plugin#416

@mhegazy
Copy link
Contributor Author

mhegazy commented Jan 14, 2016

From @tamascsaba on January 8, 2016 9:8

???

@mhegazy mhegazy added Suggestion An idea for TypeScript API Relates to the public API for TypeScript Needs Proposal This issue needs a plan that clarifies the finer details of how it could be implemented. labels Jan 14, 2016
@RyanCavanaugh
Copy link
Member

What's going on here?

@mhegazy
Copy link
Contributor Author

mhegazy commented Jan 14, 2016

API support for a new LS operation to move a file. the new operation would result in , similar to rename, a set of changes to be applied to the project.

for instance, if you more a module, all imports will be adjusted to reflect the new name/path. similarly /// references would be rewritten as well. possiblly tsconfig.json references.

@danrasmuson
Copy link

+1

@mhegazy
Copy link
Contributor Author

mhegazy commented Sep 29, 2016

A better explanation can be found in #10218 (comment)

@daprahamian
Copy link

👍

@mhegazy mhegazy added the Domain: Refactorings e.g. extract to constant or function, rename symbol label Nov 21, 2016
@designxtek
Copy link

👍

2 similar comments
@misantronic
Copy link

+1

@sergeushenecz
Copy link

+1

@xLama
Copy link

xLama commented Feb 27, 2017

I think this is a MUST. Very useful.

@remojansen
Copy link
Contributor

Do you guys have any updates about this issue? It is not in the Roadmap.

@derth
Copy link

derth commented Apr 5, 2017

The reason i code with webstorm open, side by side with vscode, to rename/move files/folders and update all imports automatically.
+10

@aluanhaddad
Copy link
Contributor

Aggregate 👍 on the OP 😀

@uglycoyote
Copy link

@aluanhaddad, no, it's good that he posted this. He provided valuable information that Webstorm has an implementation of this.

@wclr
Copy link

wclr commented Apr 11, 2017

This would be very valuable and actually, must. When this can be expected?

Another feature, not sure mentioned anywhere or not, is ability to move TS export (interface/function/const../whatever) into another file, so that it would find all the import references in other files and changed them to a new location. Also, would add import in the original file if moved object was used there.

@hillbillydev
Copy link

+1

@orgito
Copy link

orgito commented May 2, 2017

I have been using this Move TS extension with good results.

@designxtek
Copy link

Would the changes be on vscode or typescript api providing vscode that ability to rename/move files?

@jcezarms
Copy link

A definite must. If you don't plan a months-ahead architecture for any big project you get in, the final structure will either be a complete mess or organized at the cost of many head-scratching hours.

@moonforeshot
Copy link

@orgito damn that plugin should have been built into vscode itself! a real gem

@alalonde
Copy link

alalonde commented Jun 19, 2017

Agreed that this is vital. Without that plugin it would have pushed me over the edge to Webstorm. The only weakness with the plugin is that it saves automatically; to be compatible with "rename symbol" in VSCode it should make the changes in all dependent files but not save them.

@Chris2011
Copy link

Any news here?

@RobertPaulson90
Copy link

No news?

@baszalmstra
Copy link

+1

@leocaseiro
Copy link

Hi @misantronic, @sergeu90, @tinee and @baszalmstra

Have you ever seen that you could use emoji reaction instead of posting +1?

Every time we post comments on GitHub, all the subscribers of the topic receive notifications and some users, receive emails too. It's kind of frustrated reading an email written: +1

The community appreciates if we all start using the reactions instead:
github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments

I apologise for any offence it may cause and for the others getting this notification.

@umagon
Copy link

umagon commented Dec 21, 2017

So, is this not gonna be implemented?

@mhegazy
Copy link
Contributor Author

mhegazy commented May 3, 2018

Should be covered by:

  1. New rename command: Add 'renameFile' command to services #23573
    Triggered by IDE to update the project after a file rename event
  2. Refactor - Move to a new file: Add 'move to new file' refactor #23726
    Triggered manually by selecting a declaration(s) and moving them to a new file

@mhegazy mhegazy closed this as completed May 3, 2018
@mhegazy mhegazy added the Fixed A PR has been merged for this issue label May 3, 2018
@mhegazy mhegazy added this to the TypeScript 2.9 milestone May 3, 2018
@microsoft microsoft locked and limited conversation to collaborators Jul 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
API Relates to the public API for TypeScript Domain: Refactorings e.g. extract to constant or function, rename symbol Fixed A PR has been merged for this issue Needs Proposal This issue needs a plan that clarifies the finer details of how it could be implemented. Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests