How can Arduino undo levels be increased

using Arduino IDE 1.8.19.

Just ran out of undo levels in a long edit.

How many undo levels are the in the IDE and can that be increased?

increasing the number of undo-steps is a comfortable solution.
another approach would be to save several snapshots of code-versions that do compile.
Me personal I'm doing this by adding a 3-digit increasing number and two or three keywords about the most recent changes in this code-version compared to the previous version.
Store-on-SD-001.ino
Store-on-SD-002-setup-opens.ino
Store-on-SD-003-not-exists-create.ino
Store-on-SD-004-...
etc.

best regards Stefan

It is better to learn how to use any version control system -i.e. github, rcs...

Can one of these version-control systems be used with Ardiuno-IDE 1.8.19?

Can you post a link to an easy to understand step by step using screenshots tutorial for a version-control-system?

best regards Stefan

Hi @PickyBiker

From a quick experiment, it looks like it is 100 in Arduino IDE 1.x.

I'm not aware of any easy way to do it. It looks like you would need to modify the Arduino IDE source code and then build the application from that modified source. With enough research, you should be able to learn how to accomplish that by starting from the tidbits of information contained in the discussion here (the Arduino IDE 1.x editor is built on RSyntaxTextArea):

A much easier solution would be to upgrade to Arduino IDE 2.x. Arduino IDE 2.x has an "unlimited" undo history (limited only by the available resources of your system).

1 Like

That will not help unless you save and check in / submit every time that you do a few edits. I use @StefanL38's approach so I can roll back; I might have 10 different versions in a day.

I don't agree. Using "Save As" saves a full copy of the sketch (that is, all files, not only the ino).

I don't see any problem with this. You can check in tens times a day, if you need. You should save your changes anyway when you compile the project. Since each commit in the git has an explanatory message and they all line up in a version tree, it is much easier to understand this than in a bunch of saved files.

In addition, any version control system supports branches - which is very convenient for isolating risky changes from the main development line. Before I learned how to use it, I often just discarded many ideas for fear of breaking code that was already working. Now I just open a new branch and make changes in it, and the debugged project exists in parallel.

I find it inconvenient unless there is an automatic way to commit every save. I have no idea.

I didn't commit every saving, I do this when the change means some logical change in the state of the code. Sometimes it happens after changing one character, and sometimes after a couple of hundred lines

1 Like

describe in detail how you setup your system to make this work.

What do you use as "proper GUI"????
and what are all the tiny steps of configuration to make it work???
I'm 100% sure that a newcomer has a lot of hassle with the configuration.
Prove me wrong by describing it in detail

best regards Stefan

There are several excellent standalone "Git client" applications available. These allow you to perform Git operations via a graphical interface instead of using Git directly from the command line.

I would not recommend setting something up that truly makes a commit with a single button press because there is great benefit in making the effort to write a commit message that documents the purpose of the changes contained in the commit. However, the Git clients do make Git much more friendly to users who prefer working from a GUI.

There is a fairly comprehensive list of Git clients here:

https://git-scm.com/downloads/guis/

I use this one:

Git Extensions is excellent. However, there are a couple of things that might make it a poor choice for some:

  • It is Windows-only
  • It has a lot of features. That is great for an advanced user, but will make the learning curve fairly steep for someone who is just getting started with Git

The other Git client I have experience with is the gitk and git gui applications that are included in the Git installation. The UI is a bit crude when compared to Git Extensions and some of the other popular Git clients I tried out, but they are actually pretty good in terms of functionality and they are compatible with all operating system so I end up using them sometimes when working on my Linux machine. Since you will already have them installed on your computer if you are using Git, it is definitely worth a try.

1 Like

Is Arduino IDe 2.x includes a git or other version sys tem support?

No. My opinion is that it is much better to use a standalone Git client.

The reason is that you are likely to eventually want to put all sorts of projects under Git version control; not only Arduino sketches. Using a standalone Git client allows you to use a single interface for working with all your Git repositories. The alternative approach of using a Git UI integrated into the development tool means that you will have to learn a separate interface for each of the development tools you use. You may even end up having to use a standalone client in addition for projects where the development tool doesn't have an integrated Git GUI.

1 Like

I don't know of one.

That would be very cool! I have personally benefited greatly from using Git in my own projects (and later in my work for Arduino) and I think that providing resources to help more of the Arduino community (specifically the more advanced users; I don't recommend it for beginners) to start using Git would be a very valuable contribution.

I think it would be more accurate to say it is based on VS Code. It is true that the Theia IDE framework Arduino IDE is built on is a project of the Eclipse Foundation, but it is my understanding that there isn't any significant overlap between the Eclipse IDE and the Eclipse Theia project other than the presence of "Eclipse" in the name.

This is relevant because the Theia IDE framework supports VS Code extensions and there are VS Code extensions that add Git integration. So theoretically it might be possible to install such an extension in Arduino IDE to achieve the integration you hope for. Since I don't have any personal interest in such a thing, I never tried it (though I have installed other extensions) so I can't say whether this will work as expected. Arduino doesn't provide official support for extending the capabilities of Arduino IDE in this way, so it is definitely an "at your own risk" sort of thing, but there are instructions for installing extensions here:

https://github.com/arduino/arduino-ide/blob/main/docs/advanced-usage.md#3rd-party-themes

The instructions are specific to installing VS Code themes (which is officially supported), but themes are just a specific type of VS Code extension, so the same instructions (except for the last part about selecting the theme from the preferences) apply to installing any extension.

Sorry, I meant second option, because I used a Git UI integrated into VS_Code (Linux) and VS VM-Micro (Windows).

I think that the most important thing is to understand the principles of working with Git, after that the graphical interface of any client is learred without problems. Besides the built-in Git UI in VS_code and VM_Micro, I use GitKraken and SourceTree in windows and Gitg in Linux...

I would like that also!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.