Skip to content

Make non-sketch editor tabs closable #1469

Open
@per1234

Description

@per1234

Describe the request

Allow the user to close the tabs for non-code sketch files.

Describe the current behavior

When a sketch is opened in the Arduino IDE, all source files in the root of the sketch folder are opened in editor tabs.

All these source files are compiled into a single program. Since this fact may not be apparent to users who are accustomed to single file sketches and thus think of the .ino file as the sketch unit rather than the entire folder, a control for closing them is intentionally omitted from the primary UI.

It is also possible to open other source files, either via the "Go to Definition" feature or the "Sketchbook" view for those files under the src subfolder of the sketch. In this case, the editor tabs are closeable since these files do not represent the primary user components of the sketch program.

The ability to open supplemental non-code files (Markdown, AsciiDoc, JSON) in the editor was added in Arduino IDE 2.x. The closability of these files is currently based on location just the same as the code files. However, the reason for preventing closure of the primary code files does not really apply to these supplemental files since they are not part of the program.

🙁 Users may be frustrated by being unable to close editor tabs for supplemental files.

Arduino IDE version

2.0.0-snapshot-4e590ab

Operating system

Windows

Operating system version

10

Additional context

Originally reported at https://forum.arduino.cc/t/arduino-2-0-0-mac-ugh-why-so-backwards/1033549

Issue checklist

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the latest nightly build
  • My request contains all necessary details

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: codeRelated to content of the project itselftype: enhancementProposed improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions