Code change:
if (temp) { return this.userDataProfilesService.createNamedProfile(`${profileName} ${this.getProfileNameIndex(profileName)}`, { ...options, transient: temp }); } <del> enum ImportProfileChoice { Overwrite = 0, CreateNew = 1, Cancel = 2 } const { result } = await this.dialogService.prompt<ImportProfileChoice>({ </del> <ins> const { confirmed } = await this.dialogService.confirm({ </ins> type: Severity.Info, <del> message: localize('profile already exists', "Profile with name '{0}' already exists. Do you want to overwrite it?", profileName), buttons: [ { label: localize({ key: 'overwrite', comment: ['&& denotes a mnemonic'] }, "&&Overwrite"), run: () => ImportProfileChoice.Overwrite }, { label: localize({ key: 'create new', comment: ['&& denotes a mnemonic'] }, "&&Create New Profile"), run: () => ImportProfileChoice.CreateNew }, ], cancelButton: { run: () => ImportProfileChoice.Cancel } }); if (result === ImportProfileChoice.Overwrite) { return profile; } if (result === ImportProfileChoice.Cancel) { return undefined; } // Create new profile const name = await this.quickInputService.input({ placeHolder: localize('name', "Profile name"), title: localize('create new title', "Create New Profile"), value: `${profileName} ${this.getProfileNameIndex(profileName)}`, validateInput: async (value: string) => { if (this.userDataProfilesService.profiles.some(p => p.name === value)) { return localize('profileExists', "Profile with name {0} already exists.", value); } return undefined; } </del> <ins> message: localize('profile already exists', "Profile with name '{0}' already exists. Do you want to replace its contents?", profileName), primaryButton: localize({ key: 'overwrite', comment: ['&& denotes a mnemonic'] }, "&&Replace") </ins> }); <del> if (!name) { </del> <ins> if (!confirmed) { </ins> return undefined; } <del> return this.userDataProfilesService.createNamedProfile(name); </del> <ins> return profile.isDefault ? profile : this.userDataProfilesService.updateProfile(profile, options); </ins> } else { return this.userDataProfilesService.createNamedProfile(profileName, { ...options, transient: temp }); }

Related discussion:
text: <!-- Do Not Delete This! featurerequesttemplate --<!-- Please read our Rules of Conduct: --<!-- Please search existing issues to avoid creating duplicates. --when you import a profile file, vscode will create a new profile but not overwrite current one or merge it to current one Actually I don't need so many profiles, the default profile is enough for me. sometimes I just want to import a keybinding settings from some one, and keep my other settings after I import it, WHAT HAPPEND!!!, all my other settings and extension are gone!!! This is unreasonable! what vscode should do is merging(or overwriting) new keybinding to my old one!! <!-- Describe the feature you'd like. --
Can I have a try on this? I'm new to contributing to this repo but want to try out stuff and get along with starting out at the same time..
Edit: Ignore this, I misread this with other issue
Just wondering is not this same as Can you please distinguish your ask from the other?
partially like But I request more flexibility: Suppose current profile is profile X (X can be default or user profile) when I import A profile, that will be: A.keybinding, A.UI, A.extensions ..... and I choose A.keybindings only to import what I expect: there are 2 options for user when importing: option 1 - merge to current profile, (so X profile's keybindings overwritten but other part of settings kept) option 2 - or create a new profile partially basing on what imported (this is what VSCode currently does )
<!-- -96bd-47a8-a0e8- --This feature request is now a candidate for our backlog. The community has 60 days to the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our . Happy Coding!
<!-- -c9e0-7adb-d31b- --:slightlysmilingface: This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our . Happy Coding!
?