#525 Remember undo for files in project



it would be nice if projects would save the undo history for all open files - maybe the last 5 edits per file.

I use Geany for many different projects, large and small, and often I have no time to note what I was doing exactly before switching to another project. When I re-open a project, it would help me remember what I was doing exactly the last time I was working on it - for example by undoing the last changes in all open files.

Using Geany 0.18 on Ubuntu 10.04


  • Nick Treleaven

    Nick Treleaven - 2011-04-29

    I don't think we should implement this.

    I strongly recommend you use a version control system instead.

  • Nick Treleaven

    Nick Treleaven - 2011-04-29
    • status: open --> closed
  • Gregor

    Gregor - 2011-05-05

    A version control system is already in use, but I do not commit when I have to leave in the middle of a task and the code would break... I provide a more detailed use case to illustrate better why I think this would be a nice feature:

    There is a project I work on with 3 different machines - two offices at work and my own laptop. The project's code is stored in a Dropbox folder, as is the geany project file. On a Friday, when I want to leave the office, the current code might not be in a commitable state, so I just save all open files and close Geany.

    The good thing: if I later continue working at one of the other machines, Geany opens all files I have been working on the last time, because the Geany project file has also been synched.

    The bad thing: if I was in the middle of editing various files (i.e. website development), I have many open files (HTML, CSS, Javascript, Python) and it can take some time to remember what I was trying to do exactly in the single files. If I could now undo the last 5-10 edits in each file, that would help me a lot.

    Is this scenario too specific to my personal workflow, or do you think it could be beneficial for others as well?

  • Gregor

    Gregor - 2011-05-05
    • status: closed --> open
  • Anonymous - 2011-05-05

    Probably still a good version control system is better. You just make a branch for your work-in-progress, hack hack hack, commit & push, go home, pull, look at your log/diff/last commit(s) to see where you were, hack hack hack, commit (either amend last commit or do another commit), then when you're ready, merge the work-in-progress branch into your main branch and push back to your repository. It also saves you needing to use Dropbox, since your code always stays in a branch in your VC repository, except maybe for the Geany project file, unless you check that in to the VCS as well.

    Also, if I'm not mistaken, writing undo state out to disk from the Scintilla editing widget Geany uses would be quite a pain.

  • Enrico Tröger

    Enrico Tröger - 2012-08-25

    Just talked to Gregor (on a conference) and he sort of convinced me that this might be a good idea, as it would be way easier to use than a normal VCS for some quick editing.

    Though I think this really does not fit into Geany's core, obviously.

    But it could probably done as a plugin so it would only "hurt" users who activate it :).
    Probably the easiest way would be use an existing VCS in the background, like GIT and just automatically commit changes as necessary. The changes to be committed could maybe triggered by Scintilla's Undo/Redo signals.
    The only really interesting aspect is the GUI part to display the history and manage the commits (delete old item, restore the file to a specific revision and such).

    Not sure about performance at all, but if it is a plugin, it's probably less worse as the user can decide whether to use it or not.

    Just my 2cents (and disclaimer: I don't intend to implement it :D)

  • Dimitri P.

    Dimitri P. - 2012-12-13

    +1 to the reporter. git is more rough tool, than undos in-the-middle of edit. Imagine you have power lost, or something else for restarting your box and do not want to make new commit?


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks