Split for IDE main view

If you're working on a function that appears (in terms of text order, rather than processing sequence) in the middle of your sketch, and want to add a global variable, you need to scroll all the way to the top of your sketch and then find the function again.

It would be really useful if you could view two parts of the sketch at the same time, by splitting the screen vertically (like a lot of MSWord type software).
I know you can do the same sort of thing by using multiple tabs, but for medium length sketches it can be more convenient to have a single .ino file.

I do use this functionality a lot in all the other editors I work with (VS Code, Pycharm, notepad++). The Arduino IDE is intentionally not as full featured as other IDEs because the target users are beginners for whom the extra complexity that comes with adding features will make the learning curve steeper. Probably the split editor would have that effect, though it's not such a definite as some of the other advanced features that get requested.

Arduino has been working on another IDE that is targeted to advanced users: Arduino Pro IDE. Split editor capability would certainly be welcome there. Unfortunately, it looks like the Theia IDE framework the Pro IDE is built on doesn't currently have support for this:

So the Theia developers would first need to implement this feature, then the Arduino Pro IDE developers would have the option of using it.

For now, you should be aware that the Arduino IDE supports using external editors. So you are welcome to use your choice of advanced editor (e.g., VS Code, Notepad++, Sublime text), and only use the Arduino IDE for compiling, uploading, Library Manager, and Boards manager, etc. Just open File > Preferences and then check the box next to "Use external editor". After that, the Arduino IDE editor window will become read-only and any changes you make to the sketch externally will automatically show up in the IDE's editor window.

Annother workaround should be to split the file into two
I.e. creating a .h file that is then included at the top.
This new file can then contain the variables.
This makes it easy to just switch between the tabs.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.