VS Code Quick Tip: Exit Preview Mode

If you’ve got VS Code’s enablePreview options turned on, and they are by default, you might like to know that you can just hit ⌘-S to take it out of “Preview Mode” to prevent it from being replaced by the next file you open. In my opinion this is better than the other methods to make a file stay open: double-clicking the file’s tab (eww, touching your mouse or trackpad) or making the file “dirty” by entering some text and immediately deleting it.

I’ve never used this “preview” feature in any editor. I’ve recently gotten sick of ending up with dozens of tabs open in a project so I’ve been giving it a shot. This little tip is making me actually enjoy the feature.

Speaking of preview modes in text editors, I’d kill for Sublime Text’s legit preview mode the would instantly show you the contents of the file you had selected in the Quick Open menu. So good!