Community
    • Login

    Improve "Save all"

    Scheduled Pinned Locked Moved General Discussion
    2 Posts 2 Posters 1.2k 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.
    • mpotraM
      mpotra
      last edited by

      Currently the “Save all” does not prompt for user confirmation, when clicked, but goes directly into saving all open files.

      It’s happened to me several times, that I have accidentally clicked the “Save all” button instead of the “Save File”, given they’re so close to each other, and that has resulted in unwanted saving of several files that I was still editing.

      Is there an option to at least force “Save all” function (button or Ctrl+Shift+S) to always prompt for confirmation on being called, such that accidental triggers wouldn’t overwrite unwanted changes?
      If not, I believe it would be great to add it somewhere in the preferences and enabled by default.

      1 Reply Last reply Reply Quote 2
      • Scott SumnerS
        Scott Sumner
        last edited by

        @mpotra

        Not a bad suggestion I suppose…you may want to follow the advice here.

        You can have this functionality TODAY if you are willing to “script it”. The scripting plugins for Notepad++ are excellent. I tend to use Pythonscript; here’s some code for that which will implement a confirmation for Save All.

        Here’s SaveAllWithAreYouSurePrompt.py :

        def SAWAYSP__main():
            if notepad.messageBox(
                'Do you want to do a SAVE on all unsaved files?', # box body text
                'Are you sure??',                                 # box titlebar text
                MESSAGEBOXFLAGS.YESNO
                ) != MESSAGEBOXFLAGS.RESULTYES: return
            notepad.menuCommand(MENUCOMMAND.FILE_SAVEALL)
        
        SAWAYSP__main()
        

        You can remap the default Save All keyboard shortcut to run the script instead.

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