Skip to content

Disable reordering of .ino file tabs #646

Open
@per1234

Description

@per1234

Describe the request

.ino file tabs should always be shown in the order they will be concatenated in.

Describe the current behavior

Arduino sketches may consist of multiple files, which are shown in the Arduino IDE as tabs when that sketch is open. All the .ino files of the sketch are concatenated before compiling, starting with the file that matches the sketch name, followed by the rest in lexicographical order:

https://arduino.github.io/arduino-cli/dev/sketch-build-process/#pre-processing

The resulting program structure is conveyed to the user in an intuitive manner by the IDE ordering the .ino sketch tabs according to their concatenation order.

🙁 Arduino IDE 2.x allows this order to be changed by click and drag on the tabs. Once this has been done, the concatenation behavior will no longer be intuitive to a users without knowledge of the obscure low level details of sketch pre-processing.

To reproduce

  1. Create a sketch with multiple .ino files.
    Additional files may be added via the IDE interface by clicking the downward pointing triangle button on the right side of the tab bar and then selecting "New Tab" from the menu.
  2. Click and hold on one of the tabs.
  3. Drag the tab to a different position.

🙁 The tab order no longer reflects the concatenation order and the sketch program structure is not clear.

Arduino IDE version

Original report

2.0.0-rc1-snapshot.f0d9894

Last verified with

9a6a457

Operating system

Windows

Operating system version

11

Additional context

The .pde file extension is a deprecated alternative to .ino. These files are treated the same by the sketch preprocessor and so their tab order should also be fixed.


The order of tabs for other file types (e.g., .h, .cpp, .c, .S, .md) is not significant, since these files are not concatenated.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions