-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
Move/rename file as a command #66233
Comments
Sounds like a feature request against typescript moving to @mjbvz |
@isidorn I don't think this request TS specific. TypeScript handles any file move events, so what @OliverJAsh is asking for is a nicer UI to move the file in the first place. Such a move file UI would also be useful even without TS's support for updating imports |
Also, if we had API that allowed extensions to perform file moves within VS Code, a "file move" UI could be implemented entirely by an extension. Somewhat related to #48034 but for moves |
I also want a command to rename current edited file by Ctrl+P - it's annoying that currently I have to move mouse to the left file explorer, find the file, click it and then press F2. |
The new version adds support for "Cut" to the context menu, which is a big help: https://code.visualstudio.com/updates/v1_31#_cut-command-in-explorer-context-menu. |
We try to keep VS Code lean and we think the functionality you're asking for is great for a VS Code extension. Maybe you can already find one that suits you in the VS Code Marketplace. Just in case, in a few simple steps you can get started writing your own extension. See also our issue reporting guidelines. Happy Coding! |
We have an improved version of the WorkspaceEdit-API which does allow to rename files. |
To rename a file I use that extension : https://github.com/sleistner/vscode-fileutils |
Does that trigger TS's "update imports"? |
I try with es6 imports, no, it just rename file. |
I like to use files using the VS Code file explorer, as this is the only way to move/rename a file and then have TypeScript prompt you if you would like to update imports.
However, in a large project, it gets extremely difficult to move files using drag and drop. Folders tend to get very large, with multiple levels of nesting.
Is there an alternative way to move a file? Perhaps this could be done as a command? I'm aware some extensions provide this, however they use the file system directly, which means TypeScript won't prompt to update imports for the moved/renamed file.
The text was updated successfully, but these errors were encountered: