11

In Visual Studio Code supposed to replace/override an existing file tab? When I click package.json with nothing on the editor, it opens package.json . When I click on README.md it replaced the package.json file with the README. See GIF link below for a visual picture.

enter image description here

Note that these happen after I click the file

2
  • 2
    Welcome to Stackoverflow. Please edit your question to clarify your clear problem description and copy paste the code into the question. For guidance please check the how to ask page and how to create a minimal example. Read the links and take the tour before you start editing! Commented Aug 10, 2018 at 15:22
  • Yes, that is the preview option. Search here or in your settings for "enablePreview" to see how to disable it or work around it. Commented Aug 10, 2018 at 16:36

1 Answer 1

18

Yes, that's a feature called Preview Mode. It provides a way to quickly review files without collapsing your editor with open files. You can tell the file is in preview mode by the italics on the tab.

You can pin the file by double-clicking on the tab (italics go away) or disable the feature altogether:

  • workbench.editor.enablePreview to globally enable or disable preview editors
  • workbench.editor.enablePreviewFromQuickOpen to enable or disable preview editors when opened from Quick Open
Sign up to request clarification or add additional context in comments.

1 Comment

You can also double click on the file in the list to bypass preview mode, instead of double-clicking the tab.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.