-
Notifications
You must be signed in to change notification settings - Fork 28.8k
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
Comments
In VS Code on Windows I can already drag a file, press and hold Ctrl and then drop it to create a copy. |
@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. |
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 selectpaste
. Then you need to find the file that just got pasted, and right-click a third time and selectrename
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)
The text was updated successfully, but these errors were encountered: