Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change default opening and saving location in Visual Studio Code?

Is it possible to change the default opening and saving location when trying to open and/or save a file.

The default location seems to be the root, but I would like it to be the desktop.

like image 975
nbro Avatar asked Jul 21 '15 10:07

nbro


People also ask

How do I change the default save location in VS Code?

As you've stated yourself, the default location is the root of your system. At least, if you aren't working in a folder. What you could do, of course, is simply open your ~/Desktop as a folder in VSCode. Then, automatically, your default save location is exactly as you'd like it to be.

How do I change VS Code default settings?

To use them, do the following: Press ⌘⇧P (Mac) or Ctrl+Shift+P (Windows), & then, in the Command Palette that appears, type in open settings json & press Enter/Return. A new tab will open in VSCode labeled User Settings, with Default Settings on the left & User Settings on the right.

How do I change directory in VS Code?

You can go to that specific directory or create shortcut to desktop then click right click on that folder and then click on open with code. If you didnot see open with code then reinstall your VS code and check on open with code when you are reinstalling VS Code.


2 Answers

I haven't found anything in the Preferences settings that would support this, nor found anything stating that this is supported.

As you've stated yourself, the default location is the root of your system. At least, if you aren't working in a folder.

What you could do, of course, is simply open your ~/Desktop as a folder in VSCode. Then, automatically, your default save location is exactly as you'd like it to be.

like image 54
Juliën Avatar answered Oct 19 '22 06:10

Juliën


In case anyone is still looking for this, you set this in settings.json using the key "git.defaultCloneDirectory"

like image 1
Saiful Rizal MDRamli Avatar answered Oct 19 '22 07:10

Saiful Rizal MDRamli