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

Make it possible to move files via rename #183203

Closed
TomasHubelbauer opened this issue May 23, 2023 · 2 comments
Closed

Make it possible to move files via rename #183203

TomasHubelbauer opened this issue May 23, 2023 · 2 comments
Assignees
Labels
feature-request Request for new features or functionality file-explorer Explorer widget issues

Comments

@TomasHubelbauer
Copy link
Contributor

Did not find an existing feature request here: https://github.com/microsoft/vscode/issues?q=is%3Aissue+is%3Aopen+rename+include+directory

I would like to request that it be possible to rename a file such that the new name is a new path and the file is moved as well as renamed in one step. Example":

  • File test.txt is in the directory that is open in VS Code, e.g.: /mydir
  • In the Explorer pane, I select test.txt and press F2 and give it a new path and name: subdir/test.log
  • VS Code moves the file to /mydir/subdir and renames it from test.txt to test.log so that the extension changes

This would be in line with what is already implemented for creating new file with path names in the file name:

  • In the Explorer pane, click on the New File icom
  • Name the file subdir/mynewfile.txt
  • The file is now at subdir/mynewfile.txt
@lramos15 lramos15 added feature-request Request for new features or functionality file-explorer Explorer widget issues labels May 23, 2023
@vscodenpa vscodenpa added this to the Backlog Candidates milestone May 23, 2023
@vscodenpa
Copy link

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@TomasHubelbauer
Copy link
Contributor Author

This is totally already a feature in VS Code and according to Git blame it has been the case for two years now?? No idea how I missed this and shame on me for not checking first. I could have been using this for two years now 🤦

https://github.com/microsoft/vscode/blame/f043f49fc50ac2e984327f69ff9eb9718a396114/src/vs/platform/files/common/fileService.ts#L741

@github-actions github-actions bot locked and limited conversation to collaborators Jul 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality file-explorer Explorer widget issues
Projects
None yet
Development

No branches or pull requests

3 participants