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

Add right-click Duplicate to file explorer #127256

Closed
rofrano opened this issue Jun 27, 2021 · 3 comments
Closed

Add right-click Duplicate to file explorer #127256

rofrano opened this issue Jun 27, 2021 · 3 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) file-explorer Explorer widget issues

Comments

@rofrano
Copy link

rofrano commented Jun 27, 2021

Problem statement

Quite often developers start writing code from existing code. Especially for templated code like test cases or REST apis. It currently takes 4 steps to do this in VSCode (copy, paste, find, rename). In macOS finder you can right-click on any file and select duplicate and the file will be copied/duplicated with the suffix -copy added to the name. It would be great to have this functionality as a context menu item in the explorer of VSCode.

Existing workflow

If you want to make a copy of a file in VSCode today, you must right-click and select copy but you cannot right-click and select paste. No, you have to find an empty area of the explorer window or the folder name that you want the file in to right-click and select paste. Then you need to find the file that just got pasted, and right-click a third time and select rename to rename the file. This is four (4) steps just to duplicate one file. This is an extremely clumsy user experience.

Proposed workflow

A developer can highlight any file in the explorer and right-click and select duplicate. The command pallet prompt area would open up with the name of the file requesting the name of the new file. The developer would name the file and press enter and have a new file with a new name with the contents of the original file. I believe this is a much better user experience.

Benefit to developers

Developers can duplicate a file with a new name in a single interaction instead of having to perform four steps (copy, paste, find the file, rename)

@gjsjohnmurray
Copy link
Contributor

gjsjohnmurray commented Jun 27, 2021

In VS Code on Windows I can already drag a file, press and hold Ctrl and then drop it to create a copy.

@rofrano
Copy link
Author

rofrano commented Jun 27, 2021

@gjsjohnmurray Oh wow, Option+Drag does the same on Mac. THANKS! (Ctrl brings up the context menu).

Hmmm... I still need to use the context menu to rename the file after option+drag. Still would like a single consistent way to do it on both platforms. (I hate key combos because I can never remember them and they are not intuitively obvious)

Thanks for pointing that out though. I appreciate it. I will definitely start using it.

@isidorn isidorn added *duplicate Issue identified as a duplicate of another issue(s) file-explorer Explorer widget issues labels Jun 28, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Aug 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) file-explorer Explorer widget issues
Projects
None yet
Development

No branches or pull requests

4 participants
@isidorn @rofrano @gjsjohnmurray and others