

Right click your tab and select "Keep Open" Here's my beautiful demonstration of this:Īs you can see, when I double-click "sleep.js" and then navigate to "params.js" with a single-click, "sleep.js" remains open, and the title of the tab is in normal non-italicized text. This will tell VS Code that you want the file to stay open when you switch to a new file. Instead of single clicking on your files, (like I do in the previous GIF) double-click. Double-click your files instead of single-clicking. The next is to right-click the tab and select "Keep Open." The last is to execute the "Keep Open" shortcut (Ctrl + K Enter) while the tab is open and in focus. The most immediate, simple way to keep files open in VS Code is by double-clicking files in the explorer panel. If you're looking for the quick-fix, here it is: How do I make VS Code open files in a new tab? This quick guide will show you how this behavior works, how to work around it, why it exists, and how to change the default behavior if you wish.

This can get frustrating if you have no clue what's going on or you're coming from a different text editor that does not have this behavior by default. Sometimes when you click on a file in the explorer panel, you want it to open in a NEW tab, instead of replacing the file that you're currently working on.

Your new workaround becomes always having to edit a file to get it to stay open - even if it doesn't need to be edited! It's time to solve this. Soon, you discover that a file will stay open once it's been edited. Every time you go to swap files, the one you were JUST working on disappears, and you have to find it again in the explorer panel.

It will launch a familiar graphical program, much like Notepad from Windows.So one day while you're hacking away you realize that VS Code just doesn't want to let you keep your file tabs open. If you just need to edit some text and don't care much beyond that, try typing gedit filename.txt instead. If you have interest in linux beyond basic desktop usage, it's worth investing time learning a decent command line text editor like Vim or Emacs. Vim in particular has a steep learning curve, and does actually take some initial effort to get used to. It's conversational and easy to understand, which is due to it's IRC/instant-messaging format.įinally, there are some like aendruk who simply don't want to use advanced command line text editors. This is the best vim tutorial I've ever worked through. This is a keyboard graphic that shows you what each key does depending on if you're in edit mode, command mode, or visual mode: Alongside jondavidjohn's answer, here are two links that have indispensable information about using vim.
