Note that the system of modifying it via the BarMinimum sketch is specific to Arduino IDE 1.x. Arduino IDE 2.x uses a dedicated sketch separate from the examples for this purpose, as explained by UKHeliBob.
That works like a champ what you recommended UKHeliBob!!
however that still begs the question, WHERE is it getting the default new sketch file from in the first place? Its not BareMinimum so where is it getting the information to put into the sketch when you call up a new sketch??
That is fine, however if you dont save as... before you begin, it will start autosaving to your BareMinimum file, at least it does for me.
I know you can turn autosave off BUT, power outages, Cat walking on keyboard etc etc ... you get the idea!
If you are interested in playing around with the Arduino IDE 2.x source code, this could definitely be a good starting point and I definitely encourage you to give it a try. You can learn about running the IDE from source here:
However, I would not consider this an effective approach for a user who only wants to customize the File > New Sketch sketch because you will need to redo the customization each time you update to a new version of Arduino IDE. The old "BareMinimum" system of Arduino IDE 1.x had the same problem, except that modifying that sketch file generally took less effort. I think it would only make sense to do if you were maintaining a fork of the Arduino IDE 2.x codebase with other modifications in addition to the custom File > New Sketch sketch.
Definately going to dig into the source code to at least get a better understanding of IDE, i see where your coming from with customization with new releases, better to do it the way the solution is.
To me, it should be in the File>Preferences section, not buried in a pile of other options that are hidden from newer users.
Should be in a easier to find area. More user friendly and would be a QOL upgrade.
The reason it was put in the advanced settings instead of the Preferences dialog is because this is something only a tiny fraction of advanced IDE users will have any interest in doing.
The Preferences dialog is intended to only contain the settings the average user needs access to. If we are to add this setting, where does it end? For you, this is a significant setting, but for someone else one of the other settings (e.g., "Editor › Hover: Delay") is more significant. Before long the Preferences dialog becomes massive and makes the IDE less approachable to beginners.
I think it is a good idea. Arduino IDE 1.x's Preferences dialog had the equivalent by providing the link to the preferences.txt file where that application's advanced settings could be adjusted.
One further question please... is there a way to automatically insert the file creation date (and perhaps other useful meta data) in a '//' comment line in the default sketch so that it auto populates with the date/time when the file was created?
As to inserting the file creation date there is no way to do that as far as I know
The nearest thing that I can think of is that you can print __DATE__ and/or __TIME__ from a sketch to print the compilation date and/or time if that helps