How To Open a New Window in VS Code

Visual Studio (VS) Code has some of the most convenient tools for editing the source code of various platforms. In your data navigation, you may want to move some of the information to another screen. The best way to achieve this is to open the data in a new window, but how exactly do you do so?

How To Open a New Window in VS Code

You’ll find out right here. Keep reading for our step-by-step guide to opening a new window in VS Code.

How to Open a New Window in VS Code

VS Code can get complex at times, but the basic features aren’t rocket science. Opening a new window is no exception. You need only tap a few buttons to prop up a new window in your workspace if you’re a Windows or Linux user.

  1. Open your VS Code workspace.
  2. Press the “Ctrl + K” keyboard shortcut and release the buttons.
  3. Strike the “O” button to open your tab in a new window.

There’s another key combination with the same effect.

  1. Go to the file that needs a new window.
  2. Tap and hold “Ctrl + Shift + N” until a new window appears.
  3. Drag the file to your new window.

The process is just as easy for macOS professionals.

  1. Launch VS Code and navigate to the Workspace where you want to add the new window.
  2. Hit the “CMD + K” key combination.
  3. Let go of the buttons and tap “O” to bring up a new window.

If none of the shortcuts works, you may have changed the shortcut accidentally. Alternatively, someone else may have used VS Code from your device and set up a shortcut they prefer. Either way, you need to check your shortcut to avoid the need to try random combinations. Here’s how to do so.

  1. Press the “Ctrl + Shift + P” shortcut to open the list of key combinations. If you’re using macOS, strike “CMD + Shift + P.” An even quicker way to bring up the command overview is to tap F1. It should work on all devices, regardless of your operating system.
  2. Enter “new window” in the search field. You should now see a shortcut that corresponds to the following function: opening the active file in a new window.

How to Switch to Different Window Groups

As previously discussed, opening a new window splits your display into two groups. It’s a great move if you want to enhance your productivity and work on multiple files simultaneously.

But to elevate your workflow and make the most of the new window feature, you need to know how to cycle between different window groups. Shortcuts will be your best friend here as well.

Here’s what you should do if you use VS Code on Windows.

  • Go back to the previous window group by pressing the “Ctrl + K” key combination, followed by “Ctrl + Left arrow key.” Only after pressing and releasing “Ctrl + K” should you proceed to the other shortcut. Holding four buttons at the same time won’t do anything.
  • Head to the next window group by tapping “Ctrl + K” and “Ctrl + Right arrow key.” Again, don’t press the shortcuts simultaneously.

The process is similar if you’re a macOS user:

  • The “CMD + K” and “CMD + Left arrow key” combinations allow you to cycle to the previous window cluster.
  • The “CMD + K” and “CMD + Right arrow key” shortcuts bring up the next window cluster. The principle is the same, so activate the combinations one after the other.

You can set up different buttons for this feature by modifying your shortcuts.

  1. Strike “Ctrl + Shift + P” or “CMD + Shift + P.”
  2. Enter “View: Open Previous Editor” to view the shortcut for revisiting a previous window group.
  3. Type in “View: Open Next Editor” to check out the shortcut for going to the next window cluster.
  4. Utilize the pencil symbol to introduce a new key combination.

How to Open Files in a New Tab by Default

Speaking of default settings, one of these configurations allows a single left click on your file to show the information in preview mode. But what if you want to change this and always get a new tab with your left click? Doing so can allow you to organize your data in yet another way, not just with new windows.

You can do just that with a few simple tweaks.

  1. Tap the “Ctrl + Shift + P” key combination if you have a Windows PC or “CMD + Shift + P” shortcut if you’re a macOS user.
  2. Type in “user settings” in the search field.
  3. Choose “Preferences” and hit the prompt that lets you open your user settings. You might also be able to access your settings by tapping “Ctrl + ,” or “CMD + ,” depending on your platform.
  4. Enter the following line: workbench enable preview.
  5. Uncheck the box next to the “Editor – Enable Preview” option.

What’s great about VS Code is that you can go back and reverse your changes whenever you want. As a result, you only need to follow the same steps if you no longer want to show files in a new tab. Simply check the “Enable Preview” feature, and you’re good to go.

If you’re up for a challenge, you can also enable the new tab setting using your JSON architecture.

  1. Strike the “Ctrl + Shift + P” or “CMD + Shift + P” key combination, depending on whether you’re a Windows or macOS user.
  2. Enter this line in your search box: “user settings json”.
  3. Head to “Preferences” and press the prompt that directs you to “User Settings (JSON).”
  4. Type in this command in the JSON window: “workbench.editor.enablePreview”:false,”.

By setting the value the “false,” you tell the system to stop previewing your files with left clicks. Instead, each left click now opens files in a new tab.

How to Switch to Different Tabs

Tabs are just as important as windows when organizing and exploring your information in VS Code. The most common way to do so is to switch to the next or previous tabs.

  • Strike “Ctrl + PageDown or PageUp” on Windows or Linux if you want to visit the next (Down) or previous (Up) tab.
  • Hit “CMD + Option + Right or Left arrow key” on iOS to go to the next (Right arrow key) or previous (Left) arrow key.

You might also want to switch to the most recent and least used tabs. The following shortcuts will be the ace up your sleeve.

  • Enter “Ctrl + Tab” on Windows and Linux to open the most recently used tab.
  • Enter “Ctrl + Shift + Tab” on Windows and Linux to open the least used tab in your cluster.
  • Enter “CMD + Tab” on iOS to open the most recently used tab.
  • Enter “CMD + Shift + Tab” on iOS to open the least used tab in the cluster.

VS Code Window Functionality Demystified

Opening and working with new windows in VS Code used to be a mystery, but that’s no longer the case. Many ready-made shortcuts allow you to open and cycle between windows to help you work faster. Combined with tab functionality, they can take your workflows to new heights.

How many windows do you work in most often? What shortcut do you use to open a new window? Tell us in the comments section below.

Leave a Reply

Your email address will not be published. Required fields are marked *

Disclaimer: Some pages on this site may include an affiliate link. This does not effect our editorial in any way.

Todays Highlights
How to See Google Search History
how to download photos from google photos