Can't create a split view (edited)

Hi, I have installed Version: 2.0.0-rc9.2. Last time I used IDE 2.0 a few months ago, it was obvious how to create a new (sub) window or pane so two sketches or parts of the same sketch could be viewed side by side. It is not obvious how to do that anymore. This is a central feature of 2.0. Please help.

I tried searching the forum for a solution to this issue, but did not find anything. Probably I am using the wrong keywords.

Thanks

(edited)

What happens if you use File/New ?

Hi UKHeliBob -- Thanks for your reply. I am not sure if that will work.

What I want is very simple. To view two parts of the same sketch side by side.

I want to have two views of the same sketch set side by side. So if I modify a sketch it will immediately change the other view as well. Like it used to be in the Beta release. This was a critical 2.0 functionality.

File/New makes a new MS Window, which is a copy of the sketch, and saving edits of a sketch will wipe out other saved edits of the same sketch.

I was answering your original question which was

"how to create a new window so two sketches could be viewed side by side"

but I see that you have changed the question since then

Thanks for your reply anyway. What is the name of this viewing class or object anyways? It is not a Tab or an MS Window. What do you call it? If I knew the lingo, I could do a forum search. I used to call it sub-window. I have now also called it a "pane" (which technically is not correct). I guess it is somewhere in the GitHub code.

From memory, but I can't find a reference to it, the split screen view was removed as part of a fix for a problem with the editor, but I may well be wrong

See Split and desk windows modes are lost?

1 Like

You may be right - as there is no trace of it.

OMG what a disaster. :cry:

Thanks for the pointer. That clarifies the issue. I guess I will have to go back to RC5?

Regards

There are several areas where improvements or changes could be made but the developers are concentrating on the functional aspects of the IDE at the moment. Cosmetic enhancements will be addressed at a later date

We all have things on our wish list but can't all be first. For instance, the fact that the Serial Terminal window cannot be separated from the editor window is a major annoyance to me

Yes, that is also of great annoyance.

Meanwhile IDE 2.0 deleted the only copy I had of the one sketch file that I had heavily edited in IDE 1.0. It must have figured which of the dozen sketch files in the folder had the most edits.

I guess no attempt for improvement will go unpunished.

I'm back to RC5. I think it is one thing to tell a couple of noobs that the split view feature is buggy (which it badly is) and not to use it, and another thing to entirely disable it and inconvenience hundreds or thousands, without even warning them that this important feature has been disabled, so they don't go for hours searching for answers.

Thanks for your help and resolving my issue.

RC9/RC9.x is, in my opinion / experience, the first release candidate that is usable. I've tried a few and each time I gave them a quick test for a day and I gave up using them; they were totally unusable for me.

Did you organise a poll to get to that number :rofl:

LOL -- Well, if I say Ukraine is going to defeat Russia, do I have to organize a poll? :wink:

I have also struggled to find straightforward information about the terminology. I try to be very precise in my communication about technical matters, and that is not so easy to do when I don't possess the necessary vocabulary.

The best references I found are these:

Arduino IDE 2.x is built on the Eclipse Theia IDE framework, which is based on VS Code, so the terminology of that software can also be applied to the Arduino IDE.

There are some differences in terminology between Theia and VS Code. I believe these stem from the fact that Theia has generalized the UI, as is appropriate for a framework vs the standalone application of VS Code. For example, VS Code uses the term "Side Bar", while Theia uses "Left Panel". In Theia, each of the window areas (Main, Bottom, Left, Right) are simply a panel, and a view can be placed in any of them, so it would be silly to use inconsistent term for the Left Panel compared to the others. In cases where there is this conflict in terminology, I would give preference to Theia since the Arduino IDE 2.x is more directly related to that software than VS Code.

The one thing I am still a bit hazy on is exactly when "Widget" vs "View" terms should be used. Probably for the purposes of communication with users (vs the IDE developers), it is best to use "View" exclusively even if sometimes maybe that is either not precisely correct or an oversimplification from a purely technical standpoint.

To summarize:

  • Panel: a panel is a container for views. The Theia framework provides four panels (only three of which are used by Arduino IDE):
    • Main Panel
    • Left Panel
    • Right Panel
    • Bottom Panel
  • View: a view is a container for content. Examples include:
    • Editor
    • Library Manager
    • Debugger
    • Output
    • Serial Monitor

Back to your specific question: the editor is a view. This leaves the question: when you split the editor, are you creating two views or does it remain a single view? I don't know the answer to that. You can see some of the discussion around the addition of the feature in Theia here:

If you are willing to investigate, I would be interested in learning more about this. Probably it would be best to do that in a dedicated forum topic. Or if you are able to reproduce it using the latest nightly build and would prepare a formal bug report, you can submit it directly to the issue tracker in the GitHub repository of the Arduino IDE 2.x project:

I think i've found a (bit of a strange) workaround to make it work :slight_smile:

  • Go to file -> advanced -> keyboard shortcuts
  • Now simply press the 3 little dots next to the keyboard tab and load your sketch
  • You can now close the keyboardshotcuts

I have not found a way to close tabs or panels. So keep that in mind before you split your window in 25 pieces! :wink:

Hi @88mark

Does this produce a split editor, where you can see two tabs at the same time side by side, or does it only produce two duplicate tabs in the same editor, where you can only view one at a time?

It is the intentional design of Arduino IDE to not allow closing primary sketch tabs. The reason is that, even though the basic sketches are typically only a single file, it is possible to break your sketch into multiple files. All the code files of a sketch are compiled as a single program. It is important to convey this concept to the user because this means you can not maintain multiple separate sketches as individual files under a single sketch folder. Having all the files of the sketch open all the time, and in the order of .ino file concatenation, intuitively communicates this to the user.

It is possible to close any panel other than the editor via the primary user interface:

The left side panel is closed by clicking the icon of the currently open view (e.g., "Library Manager") in the "Activity Bar" on the left side of the Arduino IDE window (these icons act as toggles that open and close the view.

image

The bottom panel is closed by clicking the icon on the right side of the status bar ("Toggle Bottom Panel"):

Thanks Ptillisch!

It produces a split editor :tada:
Two tabs next to each other. You can even edit 1 .ino in two tabs next to each other. When you edit in the left tab, you can see the changes in the right tab in real-time. It's awesome!

Thanks for explaining. That makes sense!
I realise I'm using the IDE in a way that its not inteded for. That said, when splitting the IDE in 2 halves, it would be nice if I could have 1 tab on each side only. Right now, all .ino's are visible at both halves, but it's defininetly very workable that way.

Sorry, I used the wrong terminology it seems. What I meant, instead of 'panels':
When the screen is in split editor, it cannot unsplit (obviously, because the IDE is not intended this way). So just be aware of that before enthousiastically splitting the screen 6 times :wink:

There you go :slight_smile:

Thanks for the clarification. That is very interesting. I am currently limited in my work capabilities due to a power outage. I asked about the duplicate tabs in the single editor panel because I tried your instructions with 2.0.2 and ended up only with the duplicated editor tabs (which is a bug). I don't have a copy of 2.0.3 on this machine and have limited bandwidth on the Internet connection I'm using, but I'll try it out with 2.0.3 once I'm back to full functionality again.

This is how Arduino IDE's split editor worked back when there was more support for split editor (cerca 2.0.0-rc5). So I think that when full split editor support is implemented (arduino/arduino-ide#909) it will work as you hope it will.

Yeah, this is the reason why the project managers decided to disable the split editor capability (starting from 2.0.0-rc6). The split editor capability was introduced by chance and without the developers noticing when the the version of the Eclipse Theia IDE framework Arduino IDE is built on was updated to the version where the Theia developers had added split editor support. But this was problematic because you could split the editor but there was no way to unsplit it:

The project managers decided that it was not appropriate to have a broken feature like this in the IDE and that we did not have the resources at that time to get the feature working so it was better to disable it until we were able to add it back in a fully usable state.

As a workaround for the lack of a proper way to unsplit, I think you should be able to unsplit the editor by resetting the "workbench" layout:

  1. Press the Ctrl+Shift+P keyboard shortcut (Command+Shift+P for macOS users) to open the "Command Palette".
  2. Select the "View: Reset Workbench Layout" command from the menu.