Go Down

Topic: My Bad, user error Arduino Environment Very Basic Question (Read 377 times) previous topic - next topic

Dana1954

I'm very new to the Arduino and sketches and the environment. Not so new to engineering hardware, designing complex logic circuits, and programming/ compile Verilog, and code like sketch.

The multiple tabs in the sketcher environment is working fine. However I realized after closing the environment a file contents was lost. It seems that there is no save all protection built into this environment. It is common for people to forget to save a file once edited. More so when there are multiple tabs.

Most environments no when edits have been done and warn the user before closing the window.

Is there a feature to enable protection or am I mistaken?

Thanks for you help.

pert

The Arduino IDE always prompts you to save on exit if there are unsaved changes to your sketch. If it didn't do this, that's a bug and it should be reported an investigated. In order to do this, I would need you to provide all the information I need to reproduce the problem, including which IDE version you're using.

More so when there are multiple tabs.
Note that there is no way to close a tab in the Arduino IDE. If you select "Delete" from the tab menu, you are deleting the file that tab represents and it is the expected behavior that you will lose the contents of that file.

Dana1954

I did the delete mistake first thinking I was closing a tab and the file was gone. Luckily I had made a backup. I just check out quit and close windows and sure enough it warned me. So I believe it is user error. :) Much better than a code bug.

Can we delete this thread so not to waste other people's time.

Dana1954

Enhancement to Environment to cover computer crashes or looses power/ crashes. What happens to the sketches?

Are edits lost?

What about backups. Some programs keep multilayer backups just in case backing out of extensive changes is required.

What autosave? Save the data every so many minutes?

A Save All Tabs would be a great feature.

pert

Enhancement to Environment to cover computer crashes or looses power/ crashes. What happens to the sketches?

Are edits lost?

What about backups.
Personally, I'm not a big fan of programs doing the auto backup thing. I prefer to have my own separate system for that, which can be used with any program.

Some programs keep multilayer backups just in case backing out of extensive changes is required.
That's what version control is for. I use Git on any but the most basic projects. Again, I prefer to use a separate Git client software for that, which can be used for any file, rather than having to work with some attempt at building that functionality into each program separately.

A Save All Tabs would be a great feature.
No need. File > Save, File > Save As, the automatic save on compilation when File > Preferences > Save when verifying or uploading is enabled, and the save prompt on exit will always save all tabs.

Dana1954

I just lost a few edits due to the acrobat pdf reader locking up my system. The reader is processor hungry at times. This time even the ctrl-alt-delete was not serviced. Had to force a power cycle. I was looking at the 670 page ATMega Chip Spec downloaded locally.

I'll never mention crashes again! :)

If there were a save all tabs, especially configuring ctrl-s to save-all-tabs that would be great. I hit ctrl-s after every pass of the compiler.

My muscle memory keeps bringing back GNU-Xemacs keystrokes. I often accidentally hit CTRL-S-W which happens to close the window. With one tab that is no issue. With multiple it is, but it is my issue. Features like the following would be great.

delete to end of line
macros for repeated operations. A great feature in Xemacs.

A "are you sure" question on replace-all in the find/replace pop up. I accidently hit that yesterday. I thought it was find-all. A feature in other search pop ups. It replaced all references to a null in all tabs. :) I quit the session and started up again.

pert

I just lost a few edits due to the acrobat pdf reader locking up my system. The reader is processor hungry at times. This time even the ctrl-alt-delete was not serviced. Had to force a power cycle. I was looking at the 670 page ATMega Chip Spec downloaded locally.
If you're using Windows, try Sumatra PDF:
https://www.sumatrapdfreader.org/free-pdf-reader.html
It's very lightweight. Unfortunately it doesn't allow you to fill PDF forms. For that, I haven't found any good program so I'm stuck using that Acrobat Reader garbage. Luckily, I rarely need the forms feature so Sumatra PDF works great 99% of the time.

If there were a save all tabs, especially configuring ctrl-s to save-all-tabs that would be great. I hit ctrl-s after every pass of the compiler.
Ctrl+S does save all the tabs. There is absolutely no way to save in the Arduino IDE without saving all the tabs. The reason is that in the Arduino IDE multiple tabs are all part of the same program so it would make no sense not to save them all at the same time. In other applications, each tab might be something completely separate and so in that case saving individual tabs would make sense.

My muscle memory keeps bringing back GNU-Xemacs keystrokes. I often accidentally hit CTRL-S-W which happens to close the window. With one tab that is no issue. With multiple it is, but it is my issue. Features like the following would be great.

delete to end of line
macros for repeated operations. A great feature in Xemacs.
The Arduino IDE has an option: File > Preferences > Use external editor. If you turn that on, the Arduino IDE will pick up external changes to the sketch files. You can use your favorite editor to edit the code and then only use the Arduino IDE to compile, upload, etc. You can also go one step further and run those operations from the command line (or scripted) so that you never even need to use the Arduino IDE's GUI.

Dana1954

Thanks so much!!!

I'll check if GNU XEmaxs is still being supported.


Go Up