VS Code: With "CSS Mirror Editing" enabled in the Edge DevTools Extension and all editor groups locked, DevTools opens a new tab anyway - visual-studio-code

As the title says, when I change the CSS in DevTools, DevTools will open the css file in a new tab in Editor Group 1. It doesn't respect that this group is locked. I doesn't matter if I already have the file open in another Editor Group. It will always open a new tab in Editor Group 1.
The only time it doesn't open a new tab is if the css file is already open in Editor Group 1. If there a multiple tabs open in Editor Group 1, it will switch tabs to the css file.
So my problem is about window arrangement. I'm pretty new to VS Code but it seems like Editor Group numbers are based on the actual position. So I can't have Editor Group 1 showing the css file in the bottom right quadrant of the screen for example, because that would be Editor Group 4.
Is anyone else experiencing this?
I've tried digging through the VS Code settings related to editors and groups and found nothing of use. I've tried locking groups which isn't respected by the CSS Mirror Editing functionality, and will open a new tab in a locked group anyway. And I've looked through the Edge DevTools settings and I haven't seen any settings that talk about editors or groups.

Related

How to force VSCode to open files just once? [duplicate]

When I open a file in VS Code using Ctrl/Cmd+P, the file is opened in the current tab group of the current editor (even if the file is already open in another tab group).
I am sure there is a setting that will switch the behaviour so that if the file I am opening is already open in another tab group, then the editor will switch to the tab of the already open file (in the another tab group).
But what is the setting to configure this behaviour? 🤔
Setting is Workbench > Editor: Reveal If Open
// Controls whether an editor is revealed in any of the visible
groups if opened. If disabled, an editor will prefer to open in the
currently active editor group. If enabled, an already opened editor
will be revealed instead of opened again in the currently active
editor group. Note that there are some cases where this setting is
ignored, e.g. when forcing an editor to open in a specific group or to
the side of the currently active group.
"workbench.editor.revealIfOpen": true,
I have used this to open file in new tab, but It will not open redundant tabs
"workbench.editor.enablePreview": false,

Configure VS Code to switch to already open tab in another tab group when opening a file with Ctrl/Cmd+P

When I open a file in VS Code using Ctrl/Cmd+P, the file is opened in the current tab group of the current editor (even if the file is already open in another tab group).
I am sure there is a setting that will switch the behaviour so that if the file I am opening is already open in another tab group, then the editor will switch to the tab of the already open file (in the another tab group).
But what is the setting to configure this behaviour? 🤔
Setting is Workbench > Editor: Reveal If Open
// Controls whether an editor is revealed in any of the visible
groups if opened. If disabled, an editor will prefer to open in the
currently active editor group. If enabled, an already opened editor
will be revealed instead of opened again in the currently active
editor group. Note that there are some cases where this setting is
ignored, e.g. when forcing an editor to open in a specific group or to
the side of the currently active group.
"workbench.editor.revealIfOpen": true,
I have used this to open file in new tab, but It will not open redundant tabs
"workbench.editor.enablePreview": false,

VsCode: how to avoid to open more than one file for each editor group?

To be more productive on my work, I'd like to have the possibility to open only one file for each editor group.
My purpose is to avoid to have 20 or more tabs opened at the and of the day and lost time searching for the right opened file in that list.
I'd like to focus the desired editor group (CMD + 1, 2, 3, 4) and open a new file (CMD + p). If a file is opened in the selected editor group, I'd like to have the possibility to save it and replace it with the new one.
I think that to have at most 4 file opened at the same time is perfect and this forces me to be more focused on the code, instead of search for a file in a very big list of opened tabs.
If you wish to restrict the number of opened tabs, or close tabs automatically depending upon the threshold of an opened tab in the workspace
No more plugin needed: the next VSCode 1.42 (Q1 2020) will have a new setting for limiting the number of open editors
There are new settings to limit the maximum number of editors that are open at the one time.
workbench.editor.limit.enabled: Enable this feature (off by default).
workbench.editor.limit.perEditorGroup: Whether to apply the limit per editor group or across all groups.
workbench.editor.limit.value: The maximum number of open editors (10 by default).
If enabled, VS Code will close the least recently used editor when you open a new editor.
Below you can see the behavior when the limit is set to 3:
As noted in the comments by Timo: see "User Interface/ Editor Groups".
VSCode 1.67 (Apr. 2022) will propose
workbench.editor.limit.excludeDirty
Controls if the maximum number of opened editors should exclude dirty editors for counting towards the configured limit.
See issue 144309 and PR 144545.
If you wish to restrict the number of opened tabs, or close tabs automatically depending upon the threshold of an opened tab in the workspace.
Zen Tabs plugin might be the solution.
Your requirements :
The tabs usually close silently without any notification
The threshold, as you can see from the settings, is usually fixed, but I like the idea of changing it dynamically with the intent to prevent scrolling.
Zen Tabs is the extension you are looking for.
You can get additional info here.

How to open files in new tabs in Visual Studio Code

I recently started using Visual Studio Code and I would like to know, is a way to open files in a new tab? Currently whenever I open a new file the files I currently have open disappear. I say new tab, but any option that will let me open a new file in the same window as the old one works.
I have tried disabling Preview Mode through the workbench settings as shown in this answer: How to config vscode to open files always in a new tab?. However, when I choose Open or Open Recent the new file still replaces my old file.
Thanks.
Once you have to open your settings file, add the "workbench.editor.enablePreview" property and set value to false.
For 1.21.1 version.
In user settings =>
"workbench.editor.enablePreview": false,
"workbench.editor.enablePreviewFromQuickOpen"
the best way i found.
Starting with VSCode 1.52 (Nov. 2020), you should not have any more issue: all files will open in new tabs, even in preview mode.
Better handling of preview editors:
Preview editors are now better handled with numerous improvements based on feedback and making this feature work more consistent.
The setting workbench.editor.enablePreviewFromQuickOpen is now disabled by default so that editors opening from quick open will not appear in preview mode anymore.
When you start a navigation (e.g. go to definition), the editor you start from will move out of preview mode to keep it open while the new editor will be in preview mode until you navigate further.
We changed all of our custom trees (the ones used from extensions or Git changes view for example) to work more consistently like our built-in trees (like the explorer).
This means, the following interactions now apply to all of them:
double-click or mouse-middle-click to open non-preview
Enter to open non-preview (Space to open in preview-mode)
Note: if you are the author of an extension that is leveraging our custom tree API, you can benefit from this change as well.
Make sure to use vscode.open or vscode.diff commands for the TreeItem.command and you are in!
A new menu item in the editor overflow menu allows to quickly turn off preview editors altogether:
You need to double click on the name of the file. Also, it needs to be done swiftly elsewhere you will be opening in the same tab.
You can drag and drop file near to the opened tab and the file will open in new tab.
Thanks everyone. Double clicking and dragging was useful, but it still didn't solve my problem when opening files from different projects with the "Open File" menu command. I found that Multi-root Workspaces is what I was looking for. https://code.visualstudio.com/docs/editor/multi-root-workspaces
This is likely due to Visual Studio Code opening file in what's called "Preview Mode", which allows you to quickly view files, ideally if a tab is in Preview Mode then its title in the tab bar, will be italic.
To disable Preview Mode set "workbench.editor.enablePreview": false in your settings file or use the "workbench.editor.enablePreviewFromQuickOpen" option to disable it only from the quick open menu.
Alternatively, use command palette CTL+Shift+P (to get all settings) VScode settings then in User => Workbench => Editor Management you can uncheck Enable Preview and Enable Preview from Quick Open to get the same results described above

Changing number of rows of tabs visible in NetBeans

There are times when I have a decent number of source files open at once. Is there a way to change the number of rows of tabs that are visible while working in NetBeans?
Also, I have a dual monitor setup here. I could span NetBeans across the two monitors if it were possible to have multiple NetBeans editor windows open at the same time. This is something that I use in the VS Express editions. I tend to group my source files on one monitor and the designer windows in the other. Can I do this in NetBeans?
for versions 8.0.2+:
Tools -> Options -> Appearance -> Document Tabs -> Multi-row tabs
You can also maximum row count if you wish (the default is 3).
There are 2 way's I have done this:
Drag a tab from the editor panel to the side of the editor window until the red outline shows a rectangle running from top to bottom. Drop the tab there and you get another editor pane. Opening from Project or Files will still use the original panel, but you can drag tabs between the panels.
Right click on a tab and choose "Undock Window". This will create a top-level window independent of the main NB window.
When you create files with keyboard shortcuts (eg, Ctrl-N for new file) they will open in the current panel. Likewise, navigating to other files (eg, Ctrl-Shift-B for go to source).
It's not perfect though. Some keyboard actions will dump you back to the main window, then it's Alt-Tab or fiddle with the mouse to get back.
You can control the number of rows of Tabs in Netbeans by going to (on Windows):
Tools>Options>Miscellaneous>Windows> check the multi-row tabs checkbox.
See the maximum row count with the radio button and set your number.