Vscode: Broken workflow: return to the old incremental numbering behaviour when pasting files

Created on 6 Jul 2019  路  10Comments  路  Source: microsoft/vscode

I do a lot of rapid iteration on prototype code and like to frequently copy deprecated code files into archive subdirectories so they are still readily available for me to refer to immediately, without the friction of having to do so via Git branch/commit/diff operations. I also write a lot of markdown notes in sequentially-numbered files, each of which I create by copying and pasting its predecessor which I then use as a base template that is conveniently already named correctly as soon as it is created.

Until now, the incremental numbering behaviour has been nice as it let me copy a file into a folder and it would simply increment the number at the end of the file without polluting the rest of the filename. After the latest release, it's now polluting the filename with "copy", which forces me to manually rename the file. This is one of those cases where a change to help a few users has had the opposite effect for others. Usually a change in behaviour in a new release is accompanied by a setting in recognition that different people have different workflow preferences. There is no setting in this case, so I have no choice but to accept the added friction in my workflow.

Would it be possible to include a setting to retain the old behaviour?

feature-request file-explorer verification-needed verified

Most helpful comment

We have introduced a new setting
explorer.incrementalNaming which can have the values simple or smart.
simple appends the word "copy" at the end of the duplicated name potentially followed by a number. The current vscode stable behavior.
smart adds a number at the end of the duplicated name. If some number is already part of the name, tries to increase that number. The previous behavior.

The default value is simple.

You can try it out in vscode insiders in a couple of days.
Feedback is very welcome, especially on the setting / description wording.
Thanks!

All 10 comments

I really need a digital incremental copy

This is a fair request. We will not do it in the current milestone but will consider it in the future.

@isidorn Thanks!

Yeah, I strongly prefer the previous number-based naming too, for all the same reason as @axefrog - and also because it ensured the new file would appear right next to the original file. With the new naming, the copy easily gets lost among the other files:

billing-method-status.ts
billing-method.ts
billing-plan copy.ts
billing-plan-interval.ts
billing-plan-status.ts
billing-plan.1.ts
billing-plan.ts
billing-service.ts

I'd encourage you to roll this change back asap, or alternatively introduce an option :-)

I also prefer the old method of copy. Perhaps an option could be add where the user can choose how the file is copied?

More details on the motivation why we did it https://github.com/microsoft/vscode/issues/55128
Assigning to next milestone so we introduce an option for controlling this behavior.

@isidorn Actually, I thought it would only increment the number postfix added at the end of the file name. I can certainly see how magically incrementing numbers in the middle of the file name could be surprising and confusing to users, and possibly even a source of bugs.

Personally, I'd prefer that if you copy a file, it simply adds the .1 postfix to the name of the copy, and if you then create a copy of the copy, it simply increments that postfix. This is a simple and predictable behavior, which ensures the original part of the file name remain unchanged.

@thomas-darling It wouldn't work for the workflow I described in https://github.com/microsoft/vscode/issues/55128#issuecomment-508219342 馃槙

We have introduced a new setting
explorer.incrementalNaming which can have the values simple or smart.
simple appends the word "copy" at the end of the duplicated name potentially followed by a number. The current vscode stable behavior.
smart adds a number at the end of the duplicated name. If some number is already part of the name, tries to increase that number. The previous behavior.

The default value is simple.

You can try it out in vscode insiders in a couple of days.
Feedback is very welcome, especially on the setting / description wording.
Thanks!

To verify: make sure this setting behaves as described in my last comment and provide potential feedback on the naming of the setting.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

curtw picture curtw  路  3Comments

DovydasNavickas picture DovydasNavickas  路  3Comments

lukehoban picture lukehoban  路  3Comments

chrisdias picture chrisdias  路  3Comments

trstringer picture trstringer  路  3Comments