How to open file always in a new window by VSCode?

Viewed 5825

(Using MacOS Mojave, VSCode 1.28.2)

I'm using VSCode in text editing(like .js, .txt, .csv,...).

When I double click and open a file in Finder or Desktop(or "Open in VSCode"), and if I'm opening another workspace, it opens the file in the same window as the workspace I'm already opening.

How to make VSCode to always open files in a new window?

example

2 Answers

Set "window.openFilesInNewWindow": "on" in settings.json.

Click on the gear icon on the bottom-left corner of the window, select Settings then enter window.openFilesInNewWindow in the search box that appears on the top of the Settings tab to find the setting quickly. Click on it and select "on" from the dropdown list.

It explains (below or above the setting, depending if you use the new Settings manager or edit the settings.json file):

Files will open in a new window.

You can try opening the following:

Open the Command pallet using Ctrl+Shift+p
Open user settings(which is a JSON)
Add a new property
"workbench.editor.enablePreview": false

and save it

Related