Skip to content

mrmlnc/vscode-duplicate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

d1c083c · Oct 29, 2018

History

36 Commits
Nov 26, 2017
Feb 12, 2017
Apr 7, 2018
Aug 8, 2017
Aug 8, 2017
Aug 9, 2017
Aug 8, 2017
Feb 12, 2017
Nov 26, 2017
Nov 26, 2017
Feb 12, 2017
Oct 23, 2018
Aug 31, 2016
Apr 7, 2018
Apr 7, 2018
Apr 7, 2018

Repository files navigation

vscode-duplicate

Ability to duplicate files and directories in VS Code.

Donate

If you want to thank me, or promote your Issue.

Donate

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.

Install

  • Press F1 and select Extensions: Install Extensions.
  • Search for and select duplicate.

See the extension installation guide for details.

Usage

The first option:

  1. Hover on a file or directory name in explorer.
  2. Right-click and select Duplicate file.
  3. Enter the new path for the duplicate.

The second option:

  1. Open the file.
  2. Press F1 and select Duplicate file.
  3. Enter the new path for the duplicate.

About file extension

⚠️ 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 with duplicate.keepOriginalExtension option).

For example:

  • nameOfFile!!ext – create filepath without original extension
  • nameOfFile&&ext – create filepath with original extension

Supported settings

duplicate.openFileAfterCopy

  • Type: Boolean
  • Default: true

Automatically open newly copied files.

duplicate.keepOriginalExtension

  • Type: Boolean
  • Default: true

Keep original extension if it not specified.

Keyboard shortcuts

To change keyboard shortcuts, create a new rule in File -> Preferences -> Keyboard Shortcuts:

{
  "key": "ctrl+shift+d",
  "command": "duplicate.execute"
}

Changelog

See the Releases section of our GitHub project for changelogs for each release version.

License

This software is released under the terms of the MIT license.