vscode-duplicate
vscode-duplicate copied to clipboard
Default Name Incorrect with multiple periods
create a file called validate.test.js right click -> duplicate file or directory
expected ... default name is validate-copy.test.js or validate.test-copy.js actual: validate-copy.test (drops the .js extension)
To add to this (since it's really the same issue)... filenames with spaces, the change to adding -copy, and the option to not add extensions seem to further confuse the code. Ex. MyUserscript v2.1.user.js the duplicate is suggested to name: MyUserscript v2-copy.1.user
FWIW VSCode has a new(?) option ( "explorer.incrementalNaming": "smart" ) that if you copy MyUserscript v2.1.user.js and paste it in the same folder, the duplicate is named MyUserscript v2.2.user.js (it tries to auto increment if it spots a number pattern).
Obviously the above is a new feature, since this extension was last updated, but if this extension does get updated, maybe tapping into the new logic would save building some custom logic.