moderpo
moderpo

Reputation: 31

Is there a way to tell VSCode where the .vscode folder is?

I want to have .vscode inside another folder. But the settings are reset when I do that and it creates a new folder. I searched it on the internet and in the settings but I found nothing. It would be even better if there was a way to change the settings only for my device and safe them in appdata or something, but I think that doesn't work for workspace settings.

Upvotes: 1

Views: 1679

Answers (1)

Ridwan
Ridwan

Reputation: 387

In my opinion, I'd say creating a symlink or a shortcut to the .vscode directory would be perhaps would be the easiest solution to your question.


Another solution be as proposed here:

What I did - after installing Visual Studio Code for the first time, I checked the documentation and added at the end of 'Target' field of editor's shortcut the following (there's a space before the two dashes):

 --extensions-dir="DRIVELETTER:\VSCODE\extensions"
 --user-data-dir="DRIVELETTER:\VSCODE\settings"

where DRIVERLETTER and VSCODE are the corresponding drive and directory where Visual Studio Code is installed. So mine looks like this:

"D:\Microsoft VS Code\Code.exe" --extensions-dir="D:\Microsoft VS Code\extensions"

Here is for the user data directory:

"D:\Microsoft VS Code\Code.exe" --user-data-dir="D:\Microsoft VS Code\settings"

Accessing the 'Target' field is done by right-clicking the shortcut and choosing 'Properties'

Upvotes: 1

Related Questions