Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vscode: Open file instead of previewing file from quick open

When I open up the Command Palette (Ctrl or Cmd + P), type in a filename and hit Enter, the file will automatically be opened in Preview mode.

Open File Permanently

What I want is to have an option to open a file permanently from the Command Palette. I am aware of the "workbench.editor.enablePreviewFromQuickOpen" settings, but that will disable Preview mode.

For example, selecting a file in the Command Palette and hitting Ctrl + Enter will open the file as Preview in a new Split view. I am looking for a similar shortcut to open a file permanently.

Edit 1

Correction: I meant the Quick Look mode using Cmd + P / Ctrl + P. The Command Palette is used to run commands, and cannot search or open files.

like image 444
Hanxue Avatar asked Nov 12 '17 13:11

Hanxue


People also ask

How do I turn off VS Code preview?

The only way to disable file previewing when clicked on at all is by setting "workbench. editor. enablePreview" to false . This does NOT change the behaviour, that the file only gets opened in a tab when double clicked.


2 Answers

Just press the Right arrow when your file is highlighted. The Command Palette stays exactly where it is and your file opens (in non-preview) in the background. You can do this as many times as you like.

like image 107
GunnerGuyven Avatar answered Sep 29 '22 08:09

GunnerGuyven


What I was looking for was: Settings -> Workbench -> Editor Management

I set Enable Preview and unset Enable Preview from Quick Open which makes VSCode behave like st3.

like image 22
Andrew Burns Avatar answered Sep 29 '22 08:09

Andrew Burns