Now before anyone gets mad, let me preface this by saying, "Yes, I did a quick search and didn't find my answer even though I can't possibly be the only one who is asking this..."
I am using Arduino IDE Ver. 2.3.2 on my M1 Mac Mini (not sure that is relevant but I rather not leave anything out)
I have created a bunch of files, mostly games but I also have some bitmap files that I don't really want to see clutter up my file bar at the top.
Is there any way other than copying the current sketch folder, deleting it and pasting the original content back in to "hide" the files I don't want to see?
It would be a nice feature to have a "hide" button here in this menu, maybe just a little eye icon that could be toggled like if I wanted to hide a layer in photoshop.
Or how about a way to group files together into subgroups ?
I apologise if this has been brought up before, again I did try to find if this question was asked and didn't find what I was looking for.
If you want to re-use those bitmaps in other projects, I would create a directory called e.g. bitmaps in the libraries directory and place the bitmap files in there.
If those bitmaps are specific for the project, you can create a directory called src in your sketch directory and in there create a directory called e.g. bitmaps and place the bitmap files in the bitmaps directory.
What I often do is start files that I'm not really interested in is to give them a prefix like z_Somefile.h, z_Otherfile.h etc. That way they will be in the most right hand tabs and less in the way.
You can ask for new features in Issues · arduino/arduino-ide · GitHub. I did do a quick check if something like your request was already there but did not immediately find it.
I've just tested the second approach and it works.
#include "src/bitmaps/bm1.h"
void setup()
{
Serial.begin(115200);
Serial.println(txt);
}
void loop()
{
// put your main code here, to run repeatedly:
}
where the file src/bitmaps/bm1.h contained a simple text.
I think that putting the files under the src subfolder is the right solution.
The files will not be shown as editor tabs in Arduino IDE by default, but you can open and edit them on demand in Arduino IDE 2.x by doing this:
Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
The "Preferences" dialog will open.
Check the box next to Show files inside Sketches.
Click the "OK" button.
The "Preferences" dialog will close.
Click the icon that looks like a folder in the activity bar on the left side of the Arduino IDE window to open the "SKETCHBOOK" view.
A list of all the folders in you sketchbook folder will be shown in the view.
Click the ❯ icon to the left of the appropriate folder names to expand them and navigate to the file you want to open from under the src subfolder of the current sketch.
Click on the file you want to open.
The file will open in an editor tab. When you are done working with it, hover the mouse pointer over its tab, then click the X icon that appears.
It looks like it won't be a problem for this project, but I should mention that you can only use the src subfolder to store .cpp, .h, .c, and other non-.ino code files.