How to disable preview file with single-click in vs code?

Solution 1:

From vscode 1.20:

"workbench.list.openMode": "doubleClick",

Solution 2:

The only way to disable file previewing when clicked on at all is by setting "workbench.editor.enablePreview" to false.

"workbench.editor.enablePreview": false,

enter image description here

Solution 3:

Go to File->Preferences->Settings, search for the following and disable it:

"workbench.editor.enablePreview": false

Italian Trulli

Solution 4:

The necessary settings to prevent single-click in the Explorer view opening a file at all are in the previous answers to this question but you need to apply two of them:

"workbench.editor.enablePreview": false

That will change single-click in the explorer to fully open the file instead of opening it in preview (italics) mode. Arguably this is worse than before unless you're on a touchscreen device so you also need the following setting:

"workbench.list.openMode": "doubleClick"

Now you have to double-click on a file in Explorer to open it and preview is off. Finally, I had to restart all open instances of vscode for the doubleClick change to take effect.

vscode is a moving target so I should point out this was tested in version 1.45.1.

Solution 5:

As far as I know there is no way to do this right now (version 1.12).

Many people "requested" this feature, just look at this GitHub issue.

.. and a relatively new comment about the issue:

Sorry, didn't have much time to look into this again. As it stands right now we need to clean up some debt first in the area of tree usage throughout our code before we can ask for a PR again.