restrict count of editor panels in VSCode - visual-studio-code

I would like to only have 2 editor panels open at once.
So when I OPTION + Click a file it opens in one of the open editors instead of a new one.
Is this possible in VS Code?

Related

Is it possible to configure Eclipse to open files only in one editor window?

Similar to VSCode, where if I do one click, it opens the file in the active window, if I double click, it opens in a new window.
Are there some similar functionality?

Visual Studio Code - Insert new tabs to the right

In Visual Studio Code, is there any way to have new tabs open to the right of all existing tabs? When I click a file in the explorer, it inserts the new tab to the right of the currently opened file's tab, instead of placing it at the end of my tab list.
See here for example. I'd like the dashboard.component.html to open at the end of my tab list, instead of right in the middle of my currently ordered tabs. We have this feature in Visual Studio like this.
Try:
"workbench.editor.openPositioning": "last"
Workbench › Editor: Open Positioning
Controls where editors open. Select left or right to open editors to
the left or right of the currently active one. Select first or last to
open editors independently from the currently active one.
Click the gear icon in the lower left, choose "Settings", search for the above setting and change to last.

How do you unsplit an editor, go back from 2 code views to 1, same with terminal

How do you unsplit an editor, go back from 2 code views to 1, same with terminal.
Editor Groups
To "unsplit" editor groups without closing any open files, use the menu-bars: View > Editor Layout > Single (or, while in the editor, press and release ALT and then type vls).
Editor groups are also closed by default when they become empty. You can empty an editor group by closing tabs/files or by dragging all of the tabs from that group to another.
Hints:
Grabbing the area to the right of the tabs allows you to drag/drop all tabs in a group at once.
The "Open Editors" section of the "Explorer" panel lets you use CTRL and SHIFT to select and drag/close multiple editors at once. (If you don't have an "Open Editors" section, use the "..." menu of the Explorer panel to enable it.)
Terminal Groups
Terminals work differently than editor groups and are more limited:
You can open new terminal groups by pressing the '+' icon in the terminal tab of the panel.
"Splitting" a terminal (done by clicking the split icon in the terminal tab of the panel) really just opens an additional terminal in the same group and displays it side-by-side with the others in the group.
So, two ways to "unsplit" terminals:
Kill terminals (e.g. with the trashcan icon) until there is only one left in the group.
Switch to a new terminal group with only a single terminal in it.
(as of Visual Studio Code version 1.29.1)
By mouse
To close or unsplit a split Editor you need to
either close all the tabs in the split side you want to close
or right-click on one of the tabs in the section you want to close and select Close All.
By keyboard
To close or unsplit split Terminals:
type exit in the terminal you want to close.
Note
The split Editors will not close when you close the tabs if you have in your settings "workbench.editor.closeEmptyGroup" : false
Editors:
View: Join Editor Group with Next Group workbench.action.joinTwoGroups
View: Join All Editor Groups workbench.action.joinAllGroups
Terminal:
Terminal: Kill the Active Terminal Instance workbench.action.terminal.kill
ctrl+\ to split
ctrl+w to unsplit
F1 > View: Join Editors of Two Groups
Default keybindungs for join/split editor (macOS)
join current view/group with next group (just press multiple times if you have multiple groups):
alt+cmd+1
split current view/group:
alt+cmd+2
To avoid this "VSCode irritation no. 1", you also have, beside "View: Join Editor Group with Next Group", a way to avoid the issue entirely, with VSCode 1.52 (Nov. 2020)
New setting to disable editor group splitting on drag & drop
A new setting workbench.editor.splitOnDragAndDrop allows to disable editor group splitting when using drag & drop of editors.
There is also a way to toggle this conditionally during the drag and drop operation when you press and hold Shift key (macOS) or Alt key (Windows, Linux).
Split current file (Ctrl+\) is a combination I can constantly hitting by mistake so I just removed the shortcut.
Command Palette
Preferences: Open Keyboard Shortcuts (JSON)
Paste the following object in the array:
{
"key": "ctrl+oem_5",
"command": "-workbench.action.splitEditor"
}

Change or switch to different editor quickly in eclipse ? ( not tabs)

Hi i many html editors in eclipse. each one provides different features.
Is there a way i can quickly switch the editor of current opened tab, ( other than open with option in the project explorer).
Lets say abc.html is currently open. but i want to open it in different editor. Now i have to search that file in the project explorer and then right click > open with. option.
OR
I use ctrl+shift+r to open any resource , it always opens in default editor. But i want to choose there which editor to open with" option there. :(. is there any shortcut for that?
I can well understand wanting to open stuff just using the keyboard.
I can think of 2 solutions:
1: CTRL + SHIFT + R (select file as normal) then (still in the Open Resource dialog) TAB, TAB, ENTER and then press the down arrow key until you get the right editor
2: Keep the Project Explorer 'Link with Editor' toggle on (a button on the top right of the Project Explorer View)
Now you can easily get from the file open in the editor to the correct place in the Project Explorer view (so you can right click on it).
Hope this helps!
(I also find CTRL + F7 a useful way of switching to the Project Explorer view from an editor)

Eclipse: keyboard shortcut to move tabs around?

Is there any way to setup an Eclipse keyboard shortcut which will split the current editor vertically and put the current tab on one side? For example, turning this:
before http://img.skitch.com/20100118-1n5xeuywunri6b91nfjpgdxxne.png
Into:
after http://img.skitch.com/20100118-t2c7g3nctx3w8bth4hq1rpqp9k.png
Not directly with eclipse (3.4 or 3.5)
The closest plugin I have found which might enable what you are looking for is the Split file Editor
Ctrl+6
Usage: Open a file in Eclipse, then select Window -> New Split Editor from the main menu to open a split editor of the file.
(not exactly what you want but:)
Split editor opens in a new tab as opposed to appearing within the existing tab
(so while there may be 2 instances of the same file editor, you still have a situation with one file on one side, and the other files on the other tab group)