Ability to duplicate files and directories in VS Code.
If you want to thank me, or promote your Issue.
Sorry, but I have work and support for plugins and modules requires some time after work. I will be glad of your support or PR's.
- Press F1 and
select Extensions: Install Extensions. - Search for and select
duplicate.
See the extension installation guide for details.
The first option:
- Hover on a file or directory name in explorer.
- Right-click and select
Duplicate file. - Enter the new path for the duplicate.
The second option:
- Open the file.
- Press
F1and selectDuplicate file. - Enter the new path for the duplicate.
⚠️ If you do not specify a new extension, the previous will be saved.
But you can use two special characters:
!!ext– don't preserve original extension.&&ext– preserve original extension (available withduplicate.keepOriginalExtensionoption).
For example:
nameOfFile!!ext– create filepath without original extensionnameOfFile&&ext– create filepath with original extension
- Type:
Boolean - Default:
true
Automatically open newly copied files.
- Type:
Boolean - Default:
true
Keep original extension if it not specified.
To change keyboard shortcuts, create a new rule in File -> Preferences -> Keyboard Shortcuts:
{
"key": "ctrl+shift+d",
"command": "duplicate.execute"
}See the Releases section of our GitHub project for changelogs for each release version.
This software is released under the terms of the MIT license.