Save and Restore Change History Markers
-
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…
-
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.mdwith the GISTs that explain some more details.The
BufferRestoreChangeHistory.pyscript 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.