Community
    • 登入

    Running multiple instances of Notepad++ with regular autosave

    已排程 已置頂 已鎖定 已移動 Help wanted · · · – – – · · ·
    5 貼文 3 Posters 4.6k 瀏覽
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • Irate CPRI
      Irate CPR
      最後由 編輯

      Hi, I’m trying to run mutiple instances of Notepad++. I have 4 tabs within Notepad++ On all the time because I do most of my work in those 4 tabs.
      I want to separate my other work from it, so if I open a text file from file explorer on Windows 10, it should open in a new window. If I use the -multiInst -notabbar -nosession parameter, I noticed the autosave feature is disabled for that separate instance. I want autosave to work as usual as that was the main reason I switched to Notepad++ from Notepad 5 years ago. Any solution to this problem of mine?

      P.S. I also tried to run a portable instance of Notepad++ from portableapps.com but it tells me to close the current running instance of notepad++ due to which I again can’t use multiple instances of notepad++ simultaneously.

      1 條回覆 最後回覆 回覆 引用 0
      • Scott SumnerS
        Scott Sumner
        最後由 編輯

        @Irate-CPR

        I do see that a second instance of Notepad++ will show in the Preferences Enable session snapshot and periodic backup unticked when the first instance will show it ticked. I’m not sure what you think this is doing for you—you call it “autosave” but that isn’t really what it is doing. Perhaps one of the true Autosave plugins would do what you hope for–in both instances–have you tried either of them for this scenario?

        Imgur

        If that doesn’t work for you, there are ways to script a solution to do what the Enable session snapshot… thing does…and I don’t see any reason why a script wouldn’t work equivalently in two instances…

        1 條回覆 最後回覆 回覆 引用 0
        • Irate CPRI
          Irate CPR
          最後由 編輯

          Perhaps you could call the built in backup feature autocopy instead of autosave because it constantly saves my notes to a backup folder within AppData from memory so that I won’t lose anything in case of a BSOD or application crash.

          The autosave plugins do help in situations where text files are named differently. But let’s say I already have 1 main instance of N++ running. Now I use " notepad++ -multiInst -notabbar -nosession " to open a new note instance then use the same thing again to open another note instance. In both those cases, the new text file will be named " new1 ". Now since they’re both named the same, the autosave plugin will not create 2 separate files for these but will just overwrite the same file causing problems & potentially loss of data. Even the TakeNotes plugin doesn’t help in this regard.

          Scott SumnerS 1 條回覆 最後回覆 回覆 引用 0
          • PeterJonesP
            PeterJones
            最後由 編輯

            @Irate-CPR ,

            I don’t have a solution to your autosave issue. But I just wanted to note that if you want a portable (non-installed) version of Notepad++, you do not need to go to portableapps.com; you can just download the zip package or 7z package from the official Notepad++ download page. If I have my installed copy opened in default/mono-instance mode, and run a second copy (from the folder where I unzipped the official zip package) with the -multiInst option, it opens the second copy in a new instance.

            1 條回覆 最後回覆 回覆 引用 2
            • Scott SumnerS
              Scott Sumner @Irate CPR
              最後由 編輯

              @Irate-CPR said:

              …backup feature…because it constantly saves my notes to a backup folder…so that I won’t lose anything in case of a BSOD or application crash.

              I would not be lulled into a false sense of security because of this…I was…and then I lost hours worth of work (when I thought I would have lost changes only since my last saves of the files I had been working on. You can read more of my unhappy story if you’d care to. Also, see many more such sad stories in the links I provided here. Finally, this is a FAQ Desk topic; see here.

              the new text file will be named " new1 "…Now since they’re both named the same…

              They really aren’t named the same…they aren’t named at all. I will never understand why people seem to hang onto these “new” files and expect all of Notepad++'s functionality (and plugins) to work with them like they are “real” files. They exist only as purely temporary scratchpad files, or as a really short-lived thing until a file is saved properly. My opinions only, based on observations after long-use…

              It has been a long while since I used TakeNotes, but it seems like what I remember about how it functions would not cause an issue for your intended use. But apparently you have investigated it and found that it does.

              1 條回覆 最後回覆 回覆 引用 2
              • 第一個貼文
                最後的貼文
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors