VSCode split editors by default - visual-studio-code

I want (View > Editor Layout > Split Right) by default with every new opened file.
Preferable behavior:
If I have one file open - I want the new file to open an editor at the right side of the editor that's already opened. (Split right)
If I open another file afterwards - it should open at the left editor in the place of the first file that was already open.
Then if I open another one it should open at the right editor and so on like a left-right cycle always leaving the penultimate file opened.
If this behavior is not possible what's the closest I can achieve through settings/extensions?

Related

VSCode cycle through opened files only within its own split window

Say I have 2 split windows with a few files opened in both of them as shown in the image below. I'm using the shortcut keys (on mac) "cmd+shift+[" or "cmd+shift+]" to cycle through all the opened files ("Open Previous/Next Editor"). However I was wondering if we could lock the "next" opened file that we will cycle to to be within the current split window that we are on?
i.e. Say right now I'm on 'window 2' (the split window on the right according to the image), pressing "cmd+shift+[" would bring the focus to the left split window and onto the "Untitled-4" file, but is there a way to prevent that and make it cycle to "Untitled-5" instead?
In Linux, I can use Ctrl+Tab or Ctrl+Shift+Tab to do this.
its actually the default behavior of vscode, it will cycle through opened files on the certain split window only. on the windows you could use ctrl+tab to do this
So I've found the option to perform what I wanted.
It's the "View: Open Next/Previous Editor in Group" command.

Keyboard shortcut to switch from source control "diff" mode back into normal editing?

When I select a file from the source control panel (in my instance I'm using git), it then opens the side-by-side changes for that file.
I'm aware you can edit the file on the right hand side, but is there a quick way to close the open tab and open the original file itself? Preferably a keyboard shortcut.
The shortcut I'm presenting as a solution is slightly long but will work for sure.
As soon as you open the file from the source control panel use the following shortcuts to copy the file's relative path
Windows/Linux ctrl+k Mac cmd+k immediately followed by ctrl+shift+c \ cmd+shift+c
This will copy the relative path of the file
you can then use the command ctrl+f4 / cmd+f4 to close the opened history view of the file
then open the command palette using ctrl+shift+p / cmd+shift+p and remove the > character and paste the relative path of the file using ctrl+v / cmd+v
When you open the file in the diff view take care not to click the cursor within the editor as this will move to editor focus. When in editor focus the command to copy the relative path will not work. However this can be fixed by changing this in the keyboard shortcut settings.

Eclipse - Can't View or Open Java files in Package Explorer to Editor

I clicked something or accidentally drug a file that was open in the editor and now it is no longer displayed.
If I double click on the file in Package Explorer it doesn't show in the editor like it used to. I have looked all over and can't figure out how to get this file back in the editor.
I thought clicking File - Open File would do it but that displays an open file dialog.
Another way to simulate this is to put the cursor in the editor for an open file and select File - Close. This closes the file but then if you double click on the file in the Package Explorer it doesn't open it in the editor anymore. How do I get these files to display in the editor again?
I also tried right clicking on the file and selecting "Open". This does not display in editor either.
I also tried right clicking and selecting "Open With Java Editor". This does not work either.
If I clicke "File" and then the name of the file in the MRU list . This does not work either.
Also, double clicking a file in Package Explorer fails to open any file. The file shows in the File MRU list but does not display in editor. Can not figure this out.
Also, if I select "Back to" or "Forward to" arrows on toolbar, it tracks the file in the Package Explorer by highlighting it but the file does not display in an editor like it used to.
Also, I have tried "File Open" browsing to the physical location and selecting it but that does not display in the editor either.
I had to open a new window (Window - New Window) and then Reset Perspective (Window - Reset Perspective) to get the editor back. Not sure why but I lost some of my perspective settings doing this.
In Package Explorer, instead of double-clicking on the file, try to right-click it and you should get several "Open with..." options; choose the one that matches the editor in which you want the file to open.
Your choice will also be saved as the default, so the next times you can just double-click and it will open in that same editor.
If you are customizing the perspective, then saving perspective could be a safer option to avoid such glitches.
PFB the link on how to save a perspective:
http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2FgettingStarted%2Fqs-43e.htm

Duplicate files in Canopy's split window

I cannot figure out how to open the same file in two different panes of the editor when I have split it. I right click to create a new pane, but then dragging a file that is open in the first pane only moves the file. Is it possible to view the same file in multiple panes?
Don't do it by splitting. Do it by opening a new Editor window (File menu).

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)