Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

(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

like image 986
Taichi Avatar asked Nov 07 '18 09:11

Taichi


People also ask

How do I set default spaces in VS Code?

Type “Indentation” into the search field then head to the “Editor: Tab Size” section. Replace the default space number with your preferred one: Your setting will be applied and reflected immediately. If this doesn't happen (it's a little lag sometimes), just reload or restart your VS Code.

How do you Auto Arrange in VS Code?

To automatically format the file on save, In Visual Studio Code, press Control + Shift + P or Command + Shift + P (Mac) to open the command palette and type setting and then select Preferences: Open User Settings option. Search for format on save setting and check the checkbox.


1 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.

like image 87
axiac Avatar answered Nov 16 '22 02:11

axiac