microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.49k stars 29.37k forks source link

Make it easy for users to import a profile as default #168867

Closed isidorn closed 4 months ago

isidorn commented 1 year ago

Some users in the user study were confused about what gets part of the newly imported profile and what will be a part of the default profile.

We should think about Novice users that have just been sent a profile for their work or are using one of the built-in profiles. They have no clue about VS Code, they have no clue about profiles. They do not want to be bothered by profile management. They want to use the one profile they just got.

My suggestion is helping them make the imported profile the default. Maybe we could detect if their default profile is "empty-ish". But I would love to hear better ideas.

Pindar777 commented 1 year ago

@isidorn "importing a profile as default" is a very good idea! I just got aware of the fact that a lot of settings are "offline" if not using the default profile.

starball5 commented 1 year ago

Related Stack Overflow question: Why is my VS Code always opened with the default profile?

jozsefk9 commented 1 year ago

Related Stack Overflow question: Why is my VS Code always opened with the default profile?

Where is that profile JSON file located please? I would like to edit it but I can't find it.

LitileXueZha commented 1 year ago

Here are a little tricks:

  1. change the exported profile json key name to Default
  2. MUST change vscode display language to English
  3. import profile
  4. then it will show a "Overwrite" prompt...

It failed first when I open vscode in my country language, after switch to English, it worked. πŸ™‚

UPDATE: After v1.81.0 you can't overwrite anymore, see this PR #188510, extactly in src/vs/workbench/services/userDataProfile/browser/userDataProfileImportExportService.ts.

jozsefk9 commented 1 year ago

I just figured that out these days.

Exported profile is the one with .code-profile extension. And the name is at the beginning of the file, should look like this after changing the name to Default: "name":"Default",

Best,

Jozsef K.

Sent from mobile phone

On 13 May 2023 at 15:08, θ―Έθ‘›ζž— @.***> wrote:

Here are a little tricks:

change the exported profile json key name to Default

MUST change vscode display language to English

import profile

then it will show a "Overwrite" prompt...

It failed first when I open vscode in my country language, after switch to English, it worked. πŸ™‚

β€” Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

tddschn commented 1 year ago

I want to make my imported profile as default without changing of the name key in the json.

VS Code profiles have been around for quite a while, I wonder why this is still not implemented?

BergenSoft commented 1 year ago

Hint: You don't need to change the language of VS Code before importing. Just set the name to whatever the profile is named in VS Code. English: Default German: Standard Others: See profile name in VS Code

Mikeyzy commented 1 year ago

The easiest way to bypass this for now is to downgrade to version 1.75.0, override the profile, then upgrade to latest 1.75.0.23033 I wish they revert back to old behaviour with a dialog asking if you want to override or not.

joachim-n commented 1 year ago

I just wanted to export my single profile from my old machine to my new machine, and now VS code on my new machine is a mess :(

pokey commented 1 year ago

I had to do a clean reinstall of VSCode because my installation got messed up. Before doing so, I exported my default profile with the hopes of importing it as my default profile after reinstall. Is this not possible? Should I have done something other than exporting the profile to capture my settings? I prefer not to use cloud sync

MaddyGuthridge commented 1 year ago

+1 on this. I'm trying to share a VS Code profile with students in the university course. The current system means that the settings profile that they import doesn't get used by default, which makes the setup process extremely tedious.

blinpete commented 1 year ago

any updates?

@LitileXueZha 's solution didn't work for me cuz vscode wouldn't allow to overwrite the "Default" profile.

I am on vscode v1.82.1

jay-herrera commented 1 year ago

bump +1

foxydevloper commented 1 year ago

Just ran into this when reinstalling my computer, the old way of just overwriting the default profile was patched for some reason, so now this is just a huge pain and i'll have to do what this user suggests to transfer over all my settings:

The easiest way to bypass this for now is to downgrade to version 1.75.0, override the profile, then upgrade to latest 1.75.0.23033 I wish they revert back to old behaviour with a dialog asking if you want to override or not.

here's command to install the old version that supports it: winget install --force -v 1.75.0 vscode

JackDotJS commented 1 year ago

i recently had to reinstall VS code for a number of reasons. i, for one, am not interested in using "the cloud" for every single thing, so i simply exported my profile to keep my settings. upon reinstalling, it was only then did i find out i cannot overwrite the default profile with my original one. "no problem," i naively thought. "surely i can just set this new one as the default!" nope.

im sorry but are you serious right now? do you guys really expect users to just switch profiles every single tIme they open their text editors??? how is this issue nearly a year old and still open?

ferceg commented 1 year ago

Same here, new company laptop, fresh vscode, tried to import my exported profile to Default but it's not possible.

brokenmold commented 1 year ago

No long an option to overwrite, just a blanket "already exists" error. LTS and Insiders.

nizarzitouni commented 1 year ago

@LitileXueZha any news on this?

Rasmus-123 commented 12 months ago

Please add this. It shouldn't be this difficult to switch PCs.

I made due with adding --profile "Default2" to my startup link, but it's still very annoying.

Traveller23 commented 11 months ago

Please provide the ability to import the default profile. 😒

onurusluca commented 11 months ago

I don't understand how this is even a problem? Why is this even not a default way? Isn't it so difficult to have an option to override the default profile? Please make this possible.

VladimirMikulic commented 11 months ago

+1 on this issue. This needs to be resolved.

VladimirMikulic commented 11 months ago

For those looking for manual fix, here's what works as of Dec 2023:

  1. Import your .code-profile file
  2. Close VS Code
  3. Go to ~/.config/Code/User/profiles/<profile id>
    • Copy keybindings.json and settings.json files and paste them to ~/.config/Code/User folder
    • Copy extensions.json and paste it to ~/.vscode/extensions folder
  4. Open VS Code
  5. Switch to Default profile
  6. Delete your imported profile
Roninon commented 11 months ago

UPD 11 Dec 2023 Override Default profile like export-reimport with included param "name":"Default" works only on VSCode 1.75 and lower

Direct link to install Win64 Other platforms link

acoomans commented 10 months ago

+1 Made a mess of the default profile thinking there would be a way to clean/reset/reimport later, but no. Would love to reset or import or delete the Default profile.

frg-tech commented 10 months ago

Why does this feel like they identified an easy way to overwrite your profile, and then "fixed" it by not allowing that anymore?

Downgrading was the answer after futzing way too long with this. There needs to be an option when importing a profile to set it as the new default. Period!

How can this still be a thing?

SoyDiego commented 10 months ago

For those looking for manual fix, here's what works as of Dec 2023:

1. Import your .code-profile file

2. Close VS Code

3. Go to `~/.config/Code/User/profiles/<profile id>`

   * Copy `keybindings.json` and `settings.json` files and paste them to `~/.config/Code/User` folder
   * Copy `extensions.json` and paste it to `~/.vscode/extensions` folder

4. Open VS Code

5. Switch to Default profile

6. Delete your imported profile

Great solution! Thanks for share. Now I have my profile Default for my things and Work. Amazing!

smileBeda commented 10 months ago

Make it easy for users to import a profile as default [...] But I would love to hear better ideas.

So here is an idea: provide a setting to set the desired profile as default. Are you so hard sold on this that it is hard to imagine the solution at hand? Most of the users end up in this mess because vs code forces you to export/import a profile as soon you migrate machines or vs code needs to be re-installed and you do not want to go through hundreds of customizations again. Initially, it will all be in the "default" profile and after said migration you've to import said profile, effectively becoming a custom profile.

VS Code will even remember this in workspaces, which is OK, but, on new windows still will use said "default" profile, which is not even a real profile, to be honest, at this point.

As for the various hacks as in "edit file | copy file | hey go to X and do Y and screw up Z"

  1. Not the entire world is on a Microsoft computer
  2. Not the entire world is comfortable editing files in folders that are hidden on purpose
  3. It is not the way an app should be handled, at all.
  4. Please stop suggesting such "solutions". They are not solutions.
mataamad commented 9 months ago

For those looking for manual fix, here's what works as of Dec 2023:

  1. Import your .code-profile file
  2. Close VS Code
  3. Go to ~/.config/Code/User/profiles/<profile id>

    • Copy keybindings.json and settings.json files and paste them to ~/.config/Code/User folder
    • Copy extensions.json and paste it to ~/.vscode/extensions folder
  4. Open VS Code
  5. Switch to Default profile
  6. Delete your imported profile

This works on windows too, but the file locations are: %AppData%\Roaming\Code\User (e.g. C:\Users\MyUsername\AppData\Roaming\Code\User) for ~/.config/Code/User and %HOMEPATH%\.vscode\extensions (e.g. C:\Users\MyUsername\.vscode\extensions) for ~/.vscode/extensions

ReeganExE commented 9 months ago

UPD 11 Dec 2023 Override Default profile like export-reimport with included param "name":"Default" works only on VSCode 1.75 and lower

Direct link to install Win64 Other platforms link

Nice, it works.

For Mac users, simply download the dmg file, then open the downloaded app and import.

ARM64: https://update.code.visualstudio.com/1.75.0/darwin-arm64/stable Intel: https://update.code.visualstudio.com/1.75.0/darwin/stable

Insider

ARM64: https://update.code.visualstudio.com/1.75.0-insider/darwin-arm64/insider Intel: https://update.code.visualstudio.com/1.75.0-insider/darwin/insider

ypxun commented 8 months ago

For those looking for manual fix, here's what works as of Dec 2023:

  1. Import your .code-profile file
  2. Close VS Code
  3. Go to ~/.config/Code/User/profiles/<profile id>

    • Copy keybindings.json and settings.json files and paste them to ~/.config/Code/User folder
    • Copy extensions.json and paste it to ~/.vscode/extensions folder
  4. Open VS Code
  5. Switch to Default profile
  6. Delete your imported profile

In addition, if you can't find files in this path ~/.config/Code/User/profiles/<profile id> on mac, maybe here it is ~/Library/Application Support/Code/User/profiles/<profile id>.

starball5 commented 8 months ago

@ypxun yes, it goes under the user data directory

x225franc commented 8 months ago

this is a joke right ? how come "default" profile was a thing but got removed ? wtf is wrong with us willing to set "custom profile" as default ?

nharrer commented 7 months ago

The paths are different for Windows. Here is what worked for me as of March 2024 in Windows for VSCode Version: 1.87.2 (user setup):

1. Import your .code-profile file

2. Close VS Code

3. Go to `%APPDATA%\Code\User\profiles\<profile id>`

   * Copy `keybindings.json` and `settings.json` files and paste them to `%APPDATA%\Code\User` folder
   * Copy `extensions.json` and paste it to `%USERPROFILE%\.vscode\extensions` folder

4. Open VS Code

5. Switch to Default profile

6. Delete your imported profile

Note that I have vscode installed as user setup. For a system installed vscode, the paths are probably different again.

And yes, it's quite annoying that this issue is still not resolved after more than a year!

dave-alvarez commented 7 months ago

For those looking for manual fix, here's what works as of Dec 2023:

  1. Import your .code-profile file
  2. Close VS Code
  3. Go to ~/.config/Code/User/profiles/<profile id>

    • Copy keybindings.json and settings.json files and paste them to ~/.config/Code/User folder
    • Copy extensions.json and paste it to ~/.vscode/extensions folder
  4. Open VS Code
  5. Switch to Default profile
  6. Delete your imported profile

In addition, if you can't find files in this path ~/.config/Code/User/profiles/<profile id> on mac, maybe here it is ~/Library/Application Support/Code/User/profiles/<profile id>.

If anyone runs into this issue with VSCode - Insiders on Mac, the paths where you'll need to perform the manual fix are: ~/Library/Application Support/Code - Insiders/User

~/.vscode-insiders

smileBeda commented 7 months ago

@dave-alvarez not sure what Mac you have, but those paths do not exist on the latest MacOS when installing Visual Studio Code. The ones provided by @ypxun do exist and appear to work, yet, it is still a hack, and VSCode needs to make an official, proper fix for this.

STOP providing "works for me" hacks that users will apply and possibly break their apps by messing around.

dave-alvarez commented 7 months ago

@dave-alvarez not sure what Mac you have, but those paths do not exist on the latest MacOS when installing Visual Studio Code. The ones provided by @ypxun do exist and appear to work, yet, it is still a hack, and VSCode needs to make an official, proper fix for this.

STOP providing "works for me" hacks that users will apply and possibly break their apps by messing around.

My comment clearly states VSCode - Insiders...

ladusee commented 7 months ago

UPD 11 Dec 2023 Override Default profile like export-reimport with included param "name":"Default" works only on VSCode 1.75 and lower Direct link to install Win64 Other platforms link

Nice, it works.

For Mac users, simply download the dmg file, then open the downloaded app and import.

ARM64: https://update.code.visualstudio.com/1.75.0/darwin-arm64/stable Intel: https://update.code.visualstudio.com/1.75.0/darwin/stable

Insider

ARM64: https://update.code.visualstudio.com/1.75.0-insider/darwin-arm64/insider Intel: https://update.code.visualstudio.com/1.75.0-insider/darwin/insider

Today my VS Code settings got corrupted. Luckily I've been able to use backup from my secondary machine, but current versions of VS Code and VS Code Insiders do not allow to overwrite the Default profile. Thanks to this I was able to download both of version 1.75 (thanks to @ReeganExE), overwrite the Default profile, and update to the latest version.

I hope that devs will make this less of a hassle in the future.

blainehill2001 commented 5 months ago

+1 for this issue

sandy081 commented 4 months ago

You can now import and replace any existing profile (including Default profile) from new Profiles Editor UI

https://github.com/user-attachments/assets/f7f8aaa7-41fd-444c-8305-6564e80bde56

Marco5dev commented 4 months ago

when will this come out to the main version of vscode not the insiders one ?

gjsjohnmurray commented 4 months ago

Early August. See https://github.com/microsoft/vscode/issues/220925