• Login
Community
  • Login

Ensure named files saved on exit

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
5 Posts 3 Posters 1.9k 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.
  • G
    Greg Smith
    last edited by Mar 21, 2018, 9:41 AM

    On a couple occasions recently I have been surprised to discover that the version of code that I backed up on our Source Control System to access from a separate computer was not the version I last edited in Notepad++, but a previous version, even though Npp showed the correct version when I returned to the original file.

    In the past (possibly dim and distant), when you exited Npp, you were prompted to save all modified files.

    Now, it seems that Npp saves the state of everything and restores it on the next run and (including unsaved files, which start up again marked unsaved). This means that I had not lost anything (good), but as the second computer was at a different site (home), I had no access to the modified file (bad).

    I am sure that there is a way in the Preferences to make the system prompt me to save modifed files on exit, but I could not see an obvious setting… Perhaps this is part of the Backup on Save??? If so, can we have the options labelled so it is clearer what they mean: “Prompt to save modified files on Exit” would be nice and clear.

    Apologies if I have missed something obvious.

    S 1 Reply Last reply Mar 21, 2018, 11:47 AM Reply Quote 0
    • S
      Scott Sumner @Greg Smith
      last edited by Mar 21, 2018, 11:47 AM

      @Greg-Smith

      You probably have Enable session snapshot and periodic backup ticked in Settings (menu) -> Preferences… -> Backup (box on left).

      Untick that and you should be prompted if you try to quit Notepad++ with unsaved files open in editor tabs.

      1 Reply Last reply Reply Quote 0
      • G
        Greg Smith
        last edited by Apr 9, 2018, 11:49 AM

        Yes it was checked, but if I un-check it I do not get my last session restored, which is a pain as I want to continue where I left off and I have a lot of windows open.

        How do I get the behavior, which I feel that I used to have, of restoring the previous session but also to be prompted to save any edits made in this (or any previous) session?

        To re-iterate:
        It is easy to accidentally leave edits behind in a complex multi-document arrangement when your work pattern involves backup to a Source Control System, which can be very frustrating if you work in several places on different machines.

        S 1 Reply Last reply Apr 9, 2018, 11:59 AM Reply Quote 0
        • J
          Jim Dailey
          last edited by Apr 9, 2018, 11:54 AM

          @Greg-Smith You might want to try out the Session Manager plug-in to keep track of not only your “current” session, but any number of previous ones too. See: http://mfoster.com/npp/SessionMgr.html

          1 Reply Last reply Reply Quote 0
          • S
            Scott Sumner @Greg Smith
            last edited by Apr 9, 2018, 11:59 AM

            @Greg-Smith

            Well, here’s the way I have mine set, and I get:

            • session restore (to pick up with the files I was working with last time)
            • prompted upon exiting to save any red tabs (unsaved files)

            Imgur

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