Community
    • Login

    Save and Restore Change History Markers

    Scheduled Pinned Locked Moved General Discussion
    2 Posts 2 Posters 151 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Vince AmanV
      Vince Aman
      last edited by

      I rely on the Change History Markers during my programming sessions. Having to switch between multiple clients/programs with each having 20k to 50k lines of code… Change History is one of my favorite features! However, a Windows Forced Update/Reboot deletes all the Change History Markers. I would love the ability to save/restore the change history for a session or individual files. This would also help when traveling (while Hibernate works, a shutdown/restart does not). It appears this request was mentioned a few years ago, but have not found a plugin or mention of this recently… WinMerge does allow me to compare previous files/updates, but it’s not as helpful as the ability to scroll directly to the Change History Lines, etc…

      mpheathM 1 Reply Last reply Reply Quote 1
      • mpheathM
        mpheath @Vince Aman
        last edited by

        @Vince-Aman

        Change History is great feature, though programming usually uses involves a File Versioning System which keeps good progress with diffs, … . Each time I commit, I clear the Undo and Change History and then go another round of code.

        The 2nd week of the month is usually reboot time. Prepare for the worst so I wind down by closing numerous projects and usually manually reboot and start small so an unexpected forced reboot may hurt less. Starting back up with projects is like where was I with what exactly.

        The problem with your idea is make sure to prepare. The idea may have some benefit so did some scripting. The code makes a snapshot before editing the code and then later, which is after a Notepad++ restart, restore from the snapshot and then patch in the changes which will return a new Change History.

        I posted a fresh GIST with BufferRestoreChangeHistory.py . It uses a little bit of code from another older GIST BufferPatch.py so I had a head start on how to do it. There is a readme.md with the GISTs that explain some more details.

        The BufferRestoreChangeHistory.py script requires PythonScript 2 or 3. I usually use PythonScript 3 so it was lucky that testing in PythonScript 2 worked without any code modification. The code is fresh so advise to test before becoming dependent on it in a big way.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors