Go Down

Topic: File creation fail if "Use external editor" option is enabled (Read 294 times) previous topic - next topic

menegolli

Hi everybody,
I noticed that if the "Use external editor" option is set, when creating a new file only the directory is created, and not the file inside it. Am I doing something wrong?
I am on a MacBook Pro (Retina, 13-inch, Late 2013) using Mac OS 10.13.1 High Sierra.
The Arduino IDE version is 1.8.5, just downloaded from the website.

Thanks in advance,
Edo

pert

Please provide the exact set of steps required to reproduce the issue.

menegolli

Hi, here is the list of steps:

1) Open Arduino IDE;
2) Open "Preferences";
3) Select "Use external editor option" and click "OK";
4) Click on "New" icon, the new sketch appears;
5) Save the sketch as you wish;
6) A directory has been created were you selected, but not the .ino file.

Regards,
Edo

pert

OK, I figured out why I couldn't reproduce this. Because File > Save and File > Save As... are disabled when you have "Use external editor" checked but you can still click the save icon. I was looking at the menu and forgot that icon was even there. This makes me think that disabling save is intentional and the real bug is that the save icon isn't disabled. It is kind of awkward not being able to create new sketches with the Arduino IDE but I think the idea is that you would use the external editor for that or just create the files directly. The Arduino IDE is only intended to be used for compilation and upload in that mode.

menegolli

So, every time I have to create a new file I have to disable the "Use external editor option"?
This seems so intricate to me on the normal use..

Best regards,
Edo

pert

There is a new feature in the works that will automatically update sketches in the IDE when they are modified externally:
https://github.com/arduino/Arduino/pull/6074
I believe this will allow you to use the Arduino IDE and an external editor without putting it in external editor mode.

I'm not sure why there has not been much progress since on getting that feature merged. If you want to try it out there are test build download links at the page I linked above.

Go Up