I use Arduino IDE 2.3.3.
I don't know why each time the *.ino file is opened, I have to set the Board name, COM port, Programmer method to run the that file. I suppose I have to set only 1 time in the beginning. Is there any tip to save this setting ?
I moved your topic to an appropriate forum category @viet5d .
In the future, please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.
I do not know if there is a setting for it but on my system it remembers on a sketch basis.
I have recently been working on a project with a Leonardo and a Mega. Opening the corresponding sketch a few days later shows the correct board selected and port selected (I've had other boards /sketches selected in between for other projects).
The only limitation that I recall is that it will not remember the setting for examples. So if you have a sketch for a Mega and next open an example and change the board, that board will not be remembered; I think till such time that you save the example as you own sketch.
The reason for this is that the board and port configuration data in the database is associated with the path of the sketch. When you open an example sketch in Arduino IDE 2.x, it is opened as a new sketch populated with the example code. New sketches are staged in a random temporary folder, so there won't be any board/port configuration data associated with that path.
This sketch path dependence of the feature is noteworthy beyond its implications for examples: if you move a sketch to a different location on your hard drive, this will cause the loss of its association with the board/port configuration data.
Thanks, now I remember how I can reproduce it. I often make a copy of a sketch in e.g. Windows explorer and noticed that I have to set the board/port again when opening the copy.