Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Code closes my file when I search for new ones

I'm using Visual Studio Code for working and I use ctrl-P command to search for files in my directory.

The problem appears when I want to search for another file, it opens it in the place of the first searched file, closing it.

Is any setting for avoiding this pain?

like image 733
Samurai Jack Avatar asked Apr 25 '17 08:04

Samurai Jack


People also ask

Why multiple files are not opening in VS Code?

If VS Code doesn't allow you to open multiple files, the issue most likely lies in the program settings. To fix that, do the following: Launch VS Code, then click “File” at the upper part of the program window. Select “Preferences.”

Where is the unsaved file in VS Code?

Show extension side bar within VS Code(Mac: Command + Shift + X , Windows and Linux: Ctrl + Shift + X ), type unsaved-files-vscode and press Enter and click Install .


1 Answers

By default, VSCode opens files in preview mode. This is indicated by their name being italic in the menu bar. As John noted, you can double click on the file to fully open it.

To disable this behavior, try setting:

"workbench.editor.enablePreview": false 
like image 64
Matt Bierner Avatar answered Oct 11 '22 13:10

Matt Bierner