Visual Studio Code Default Folder

Viewed 26514

I recently installed Visual Studio Code to just touch stuff up on my laptop when I work with friends on projects, and I've been wondering how to set a default directory for the folder. It's kind of annoying to have to set the folder every time I open the editor.

2 Answers

autohotkey can help

add a hotkey to this

vscode_wf:= "C:\Users\noway\AppData\Local\Programs\Microsoft VS Code\code.exe"
Run, %vscode_wf% "D:\markdown_folder", ,Max

Here what VS Code says:

// An explicit start path where the terminal will be launched, this is used as the current working directory (cwd) for the shell process. This may be particularly useful in workspace settings if the root directory is not a convenient cwd.

So, you have to edit this variable:

 "terminal.integrated.cwd": ""

For instance on Gnu-Linux/Unix like:

 "terminal.integrated.cwd": "/home/oldman/C#/ASP.MVC"

On Windows

 "terminal.integrated.cwd": "C:\Users\oldman\C#\ASP.MVC"

Your terminals will be set at this current working directory (cwd) as for your root directory in the explorer, (here "/home/oldman/C#/ASP.MVC" on linux, and "C:\Users\oldman\C#\ASP.MVC").

Related