Community
    • Login

    Save and Restore Change History Markers

    Scheduled Pinned Locked Moved General Discussion
    4 Posts 3 Posters 255 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 Thomas AndersonT 2 Replies 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.

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

          @mpheath, Thanks for the reply!

          I typically bounce between 3 or 4 clients per week with each having dozens of program files of 5,000 lines or more.

          As I get older… it gets harder to remember all the changes to the files, since the applications from client to client are completely different programs with hundreds of variables, etc… Once I’ve modified a few hundred lines, with Change History highlighting, I can quickly scroll down (hyper wheel mouse) to locate the latest changes, etc…

          I’ve created a versioning tool, which I use when I compiling code, giving me the option to capture a snapshot of the previous state. I use WinMerge and/or my own custom function to compare historical code, but it’s not the same as the visual markers showing those most recent changes.

          What boils my blood is when I’ve worked one of those long 15/20 hour days and I’m mid-way through big changes, then go to bed to pass out, coming back to all my markers being gone from a Windows Reboot. I’ve continued to update group and registry settings to get the behavior to stop. While I have been successful in the past, every time I update my hardware, I miss some of those settings or an Win “update” resets something. Windows almost always bites me at the worst time…

          The most recent event happened after I answered “no” to the update reboot notification, only to have Windows reboot just a couple hours later! It’s just so demotivating… I can say I’ve lost days (if not weeks) of work due to Windows forced reboots. I’ve learned to save often, and especially before walking away from my PC!

          1 Reply Last reply Reply Quote 0
          • Thomas AndersonT
            Thomas Anderson @Vince Aman
            last edited by

            I totally understand—Change History Markers are incredibly useful, especially for large codebases. A save/restore feature would be a game-changer, particularly to survive Windows updates, reboots, or travel situations.

            Until a built-in solution exists, one workaround is to export or snapshot your files frequently and use tools like WinMerge or Git to track changes—but I agree, it’s not as seamless as scrolling directly to the Change History lines.

            Hopefully, the dev team can consider a persistent marker feature in a future update.

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