Skip to content

VS Code: Keep Editors Open

VS Code Keep Editors Open Disable Preview Editors featured image

When you click a file in VS Code, it will open in a new tab.

If you click another file, it will open in the same tab.

That’s because VS Code treats the editor as a preview.

Preview editors do not stay open and reused until you edit it or double-click the file name.

You can figure out if an editor is shown as a preview when the file name is in italic.

If you don’t like to double-click or edit an editor just to keep it open, there’s a way to disable this behaviour.

🎥 Prefer a video instead? Watch this full walkthrough:

Disable Editor Preview

Press down CTRL + , (comma) to open the Settings and disable the Workbench > Editor: Enable Preview setting.

VS Code Disable Editor Preview setting to keep editors open

Now, whenever you left-click a file, it will open in a new editor and it will stay open when you click other files.

Configure it via settings.json file

You can also disable this setting within the settings.json file.

"workbench.editor.enablePreview": false,


Let me know what you think about this article in the comments section below.

If you find this article helpful, please share it with others and subscribe to the blog to support me, and receive a bi-monthly-ish e-mail notification on my latest articles.   
  

Comments