How Do I Keep Multiple Tabs Saved in Notepad++?



  • I searched but couldn’t find the answer.

    Instead of having one long tab with varying topics, I decided to have each topic with its own tab. How do I save multiple tabs? I made new tabs and renamed them. I copied and pasted the info from the original tab into the new ones.

    However, when I try to save them or close Notepad++, they make a separate file (the tab disappears) instead of saving them as multiple tabs.

    The only tabs saved are the Changelog and the original.



  • @Troglo37 ,

    You have fundamentally misunderstood the way that Notepad++ uses and defines Tabs. Tabs are not something that Notepad++ adds to a given document. Tabs are the individual containers where Notepad++ puts one of the many files that it might have open at a given time.

    With using the two-View system (View > Move/Clone Current Document > … or the right-click equivalent), you can clone the current document to the second View, so there are two copies of the file displayed. But that’s still one Tab per View for a given file.

    Each Tab corresponds to a separate file.



  • I’m somewhat confused. So if this is the case, how/why does the Changelog have a tab that is saved with my main tab?

    Another thing. The new tabs I’m talking about, how do I save them so they are opened by Notepad++ (N++) by default like my main tab/file is? I changed one of the tab/files using ‘Open with’ to make N++ the default on the new tab/file I saved.

    However, it changed all of my text files to open with N++. I only want the ones I saved (not all of my other text files) to open with N++ so at least I can open the saved files into N++ with another tab. When I clicked Save As, I was looking for one that says N++ or something along those lines.

    Also, if I click on Save All, it asks if I want to use Admin. I say no since I’ve heard it’s not a good idea to give Admin rights to programs/apps. Is it safe to do so? And if it is, what will Save All do?



  • @Troglo37

    how/why does the Changelog have a tab that is saved with my main tab?

    change.log is a specific file that is shipped with Notepad++ to tell what’s been changed in the most recent version of Notepad++. Notepad++'s default action (after an upgrade) is to open that change.log file so you can see what’s changed. The vast majority of people (in my experience, everyone except you and maybe one or two other people who have asked similar questions in the forum) is to close that file’s tab immediately, so that it’s not saved in the current session or re-opened the next time you open Notepad++.

    That said, I do remember some time back that certain users were finding that the change.log was being re-opened even when they had closed it, and it turned out that they had pinned a shortcut (either to their start menu or task bar) and/or desktop shortcut that included full\path\to\change.log as a command-line argument. So if you have a pinned shortcut or desktop shortcut, you might want to check if there are unexpected command-line arguments in that/those shortcut(s).

    I changed one of the tab/files using ‘Open with’ …

    Okay, now you’re confusing the things again. A Tab in Notepad++ is the GUI container for the file, it is not the file itself. It’s what allows you to move things around inside Notepad++'s GUI to make it easier for you to do the edits you need. You seem to be confusing that with how the OS perceives the file (“Open With”), which is something separate that I’ll get to in a bit.

    Back to Tabs: a Tab is a GUI container for the file. Each tab holds one file; the file it contains is independent of any other file, whether it’s opened in a Tab in Notepad++ or not. Notepad++ doesn’t “group” or “associate” Tabs in the same view with each other: just because there are two or more Tabs in the same View doesn’t mean that those files in those Tabs are linked in any way.

    2597f098-0289-42e3-9a0a-96b7738d2617-image.png

    In this screenshot from my Notepad++ instance, I have two Views showing; the one on the left has Peter's Scratchpad.md, a.txt, and change.log open (three separate, completely unrelated files!), and the one on the right just has b.txt open. If I close change.log (either clicking the ☒ on the tab, or through File > Close or equivalent while my cursor is in change.log), the other files will remain open:

    5858b55b-8316-4e58-a820-aec90ead1dcf-image.png

    I could, if I wanted, move a.txt to the other view:
    03fceb7d-bbe7-4b3b-a5a3-873a0bd1fa08-image.png
    … this doesn’t mean that a.txt is now “attached to” or “associated with” or “saved with my b.txt Tab”.

    I changed one of the tab/files using ‘Open with’ to make N++ the default on the new tab/file I saved.
    However, it changed all of my text files to open with N++.

    If you are dealing with the Windows Explorer (double-clicking files to get them open, or Right Clicking and selecting “Open With”), that’s Windows OS features and Windows OS knows nothing about “Tabs” in Notepad++.

    When you associate a file type (which Windows, for historical reasons, determines by file extension), then every file of that type is associated with Notepad++, not just one specific file. That’s the way Windows works, and has since Win 3.11, as far as I can remember.

    When I clicked Save As, I was looking for one that says N++ or something along those lines.

    Save As is used for giving a name to the file. The File Type in that Save As dialog suggests reasonable extensions for that file type, and (in certain circumstances) will pick the first extension shown if you type a file name without typing an extension. That doesn’t in any way affect whether or not you can open a file with Notepad++.

    Also, if I click on Save All, it asks if I want to use Admin.

    That’s probably because you’ve edited change.log and Notepad++ is trying to save that file to the same directory where notepad++.exe lives: that’s often c:\Program Files\Notepad++\ or equivalent, and the Program Files hierarchy are often write-protected so that you won’t accidentally change critical application files.



  • @PeterJones I guess I should be more clear. As far as Save As, I was trying to save the tab files to a file type that only N++ will recognize so all I’ll have to do is click on the file instead of using Open With.

    Okay, I’m not sure what I just did, but I made it work. This is all I can remember.

    I used the program Everything (an awesome search program) to locate one of the saved tab/files. I noticed that the extension for the main tab file is .TEX, not .txt.

    I copied and pasted the contents of the tab/file into swriter (by LibreOffice) as a backup, and to make sure it wasn’t associated with a .txt file.

    Then I used Everything to try to change it, but it reverted back to .txt. Everything shows the extension by default if I’m not mistaken. It’s possible I may have changed it to do that. I’ve been using it for many years.

    When I went to close N++ to see what would happen, it gave a message that I would lose the info. Being that I had it pasted (not saved) in swriter, I went ahead and closed it. I reopened N++and all of the tabs with all of the info are there!

    I may have missed a step because I was just fumbling around trying to use logical ways to make it work and wasn’t focused on documenting every step I made.

    What do you think happened?



  • @Troglo37 ,

    As far as Save As, I was trying to save the tab files to a file type that only N++ will recognize so all I’ll have to do is click on the file instead of using Open With.

    If you wanted to associate the .TEX extension with Notepad++, you would do that in Windows (often, an Open With plus the checkbox to say “remember this” or whatever Windows’ phrasing is), then do so.

    After that, double-clicking on .TEX files will open them in Notepad++.

    If you want to save a file as .TEX, you need to type filename.tex in the Notepad++ Save/SaveAs dialog. The dropdown choices in the Save As file-type pulldown are compiled into Notepad++, so you aren’t going to have a way to influence them based on your custom file types. Instead, just type the extension you want.

    Then I used Everything to try to change it, but it reverted back to .txt.

    Not really sure. We’re not experts on Everything around here (so to speak).

    When I went to close N++ to see what would happen, it gave a message that I would lose the info.

    Yes, unsaved files will be lost if you don’t save them, and if you don’t have the Settings > Preferences > Backup > Enable session snapshot and periodic backup turned on.

    I went ahead and closed it. I reopened N++and all of the tabs with all of the info are there!

    I am not sure what you mean by that. Do you mean that you changed a file, didn’t save it, and yet when you reloaded, the file was there with the changes intact? That usually only happens when you have the snapshot feature enabled (as described above)… but then it wouldn’t have prompted you about losing info.

    What do you think happened?

    I don’t know. I don’t think you’ve described the full sequence of events completely enough, but I could be wrong. But either way, I’m not sure exactly what happened.

    Maybe someone else can chime in, because I’m not sure there’s much more I can do to help you with this situation.



  • This post is deleted!


  • @PeterJones said in How Do I Keep Multiple Tabs Saved in Notepad++?:

    @Troglo37 ,

    If you want to save a file as .TEX, you need to type filename.tex in the Notepad++ Save/SaveAs dialog. The dropdown choices in the Save As file-type pulldown are compiled into Notepad++, so you aren’t going to have a way to influence them based on your custom file types. Instead, just type the extension you want.

    Thanks for that info PeterJones.



  • FYI, I just made and renamed another tab. Of course, as a backup, I copied and pasted the info into swriter, but didn’t save it.

    I clicked the Save button on the N++ toolbar and it opened the dialog box. I decided to close it and then closed N++. I reopened, and the tab with all of the info is there.

    I know you mentioned something about what I may have done to the configuration that might have allowed the tab thing to work.

    The only thing I remember is a while back I added what I guess could be called a hack that allows me to have more entries. The only problem is that once N++ closes, it erases the extra entries down to the default amount.

    I found the “hack” to add extra entries (in the second post by Scott Sumner) in this thread I started several years ago. Unfortunately, this issue hasn’t been addressed by the dev. https://community.notepad-plus-plus.org/topic/13320/how-do-i-delete-search-entries?_=1622755358125



  • @Troglo37 said in How Do I Keep Multiple Tabs Saved in Notepad++?:

    FYI, I just made and renamed another tab. Of course, as a backup, I copied and pasted the info into swriter, but didn’t save it.

    I clicked the Save button on the N++ toolbar and it opened the dialog box. I decided to close it and then closed N++. I reopened, and the tab with all of the info is there.

    “the dialog box” = does that mean the Save dialog box, or something else? Because I don’t know why it would be popping up a dialog box when you hit SAVE, unless you are trying to save a file that hasn’t ever been saved before. It would really help you to get help if you would actually tell us what’s going on, rather than giving cryptic hints.

    Based on “I decided to close it”, I assume you cancelled the save dialog without giving the file a name. That sounds foolish in the extreme to me, since the whole reason you hit SAVE was to save the file. Why you would then choose to not save is beyond me.

    “I reopened, and the tab with all of the info is there” = I assume this means that after not saving your file, you exited Notepad++, and then when you re-started Notepad++, the file was there, even though you had never saved it. That is likely because when you install Notepad++, it defaults to having the Settings > Preferences > Backup with the “current session” and “session snapshot” checkboxes checked on:
    a2ff4d46-7bc8-4085-8bd5-719c944bfe7f-image.png

    I know you mentioned something about what I may have done to the configuration that might have allowed the tab thing to work.

    “the tab thing” shows you still don’t know what a tab is vs. what a file is. I unfortunately cannot explain it any better.

    The “something about … configuration” was my saying Settings > Preferences > Backup, which is supposed to communicate to you that you go to the menu bar, click the Settings menu, then click the Preferences menu option, then in the dialog that shows up, you click on the word Backup. (That’s fairly standard nomenclature in any forums and documentation sets for choosing menu entries in applications on the Windows OS – including some of Microsoft’s own documentation. Settings | Preferences | Backup is another common way of rendering the same action – choosing an entry from a menu.)

    I had previously mentioned that because you implied that it was asking you to save unsaved files, so I was telling you what option controls whether or not it does that. Now you are saying that the opposite is likely true, and that option was already turned on; this implies to me that really, back in your original request, it wasn’t asking you to save because you were closing notepad++ without saving, but that it was really asking you to pick a name for the file that you explicitly told it to save.

    The only thing I remember is a while back I added what I guess could be called a hack that allows me to have more entries. …

    If it hadn’t been for the link to the conversation between you and Scott, I would have had no clue what that was trying to indicate; so thanks for the link, anyway. No, changing the number of items available in the “search history” will not in any way, shape, or form influence how files present in tabs are saved.

    Unfortunately, this issue hasn’t been addressed by the dev

    I just poked that issue#2931: Scott, who you were talking with in that other topic from 2017, is now on the dev team, and I thought he might find it interesting to revisit the workaround he did 4 years ago and put it into the actual codebase.



  • @PeterJones said in How Do I Keep Multiple Tabs Saved in Notepad++?:

    @Troglo37 said in How Do I Keep Multiple Tabs Saved in Notepad++?:

    FYI, I just made and renamed another tab. Of course, as a backup, I copied and pasted the info into swriter, but didn’t save it.

    I clicked the Save button on the N++ toolbar and it opened the dialog box. I decided to close it and then closed N++. I reopened, and the tab with all of the info is there.

    “the dialog box” = does that mean the Save dialog box, or something else? Because I don’t know why it would be popping up a dialog box when you hit SAVE, unless you are trying to save a file that hasn’t ever been saved before. It would really help you to get help if you would actually tell us what’s going on, rather than giving cryptic hints.

    I don’t understand it either. That’s why I came to the forum. The main tab never opens a Save dialog box by clicking on the Save button on the taskbar. I thought the new tabs I made should behave in the same way.

    I just made a new entry in one of the new tabs. The dialog box opened and this time I saved it. I didn’t bother changing the name or extension of the file. Now it saves without opening a Save dialog box like the other two new tabs I made.

    So apparently, I have to save the tab/file using the Save dialog box, and hereinafter, it will no longer open a Save dialog box?

    Based on “I decided to close it”, I assume you cancelled the save dialog without giving the file a name. That sounds foolish in the extreme to me, since the whole reason you hit SAVE was to save the file. Why you would then choose to not save is beyond me.

    Because at first even after I used the Save dialog box, it kept opening it anyway after clicking the Save button on the toolbar. So I figured, rightly so, that if I didn’t use the Save dialog box, it would save the tab/file.

    I’m still confused as to why at first saving using the Save dialog box wouldn’t work. Maybe closing and opening N++ made it behave correctly?

    “I reopened, and the tab with all of the info is there” = I assume this means that after not saving your file, you exited Notepad++, and then when you re-started Notepad++, the file was there, even though you had never saved it. That is likely because when you install Notepad++, it defaults to having the Settings > Preferences > Backup with the “current session” and “session snapshot” checkboxes checked on:
    a2ff4d46-7bc8-4085-8bd5-719c944bfe7f-image.png

    That’s correct. I just checked. ‘Backup on save’ is set to None. Is that what initially caused the Save dialog box to keep popping up?

    I had previously mentioned that because you implied that it was asking you to save unsaved files, so I was telling you what option controls whether or not it does that. Now you are saying that the opposite is likely true, and that option was already turned on; this implies to me that really, back in your original request, it wasn’t asking you to save because you were closing notepad++ without saving, but that it was really asking you to pick a name for the file that you explicitly told it to save.

    Oh.



  • @Troglo37 ,

    The main tab never opens a Save dialog box by clicking on the Save button on the taskbar.

    There is no “main tab”. There are Tabs. No tab has any particular preference over another.

    I have to assume that whatever file is open in that tab already has a name, so hitting the SAVE button just saves the file.

    I have to save the tab/file using the Save dialog box, and hereinafter, it will no longer open a Save dialog box?

    Yes, if you create a new file in Notepad++, the first time you save it, it has to pop open the dialog box in order to give the file a name. Windows notepad.exe works the same way: if you create a new file, it will ask you for a name when you save it.

    Because at first even after I used the Save dialog box, it kept opening it anyway after clicking the Save button on the toolbar. So I figured, rightly so, that if I didn’t use the Save dialog box, it would save the tab/file.

    You are relying on a feature of the program that you obviously don’t understand to save a file for you when you haven’t ever given the file a name. It works for you, because Notepad++'s default behavior is to protect you from yourself, if it at all can. But there are times when Windows OS crashes or other issues will prevent Notepad++ from correctly doing the background save, and then you will be out of luck. Best practice is to always give files a name by saving files to a known location, and save often, and make sure you have backups of critical data.

    I’m still confused as to why at first saving using the Save dialog box wouldn’t work.

    Because, as far as I can tell, you hit CANCEL instead of giving it a name and saving it.

    ‘Backup on save’ is set to None. Is that what initially caused the Save dialog box to keep popping up?

    No. “Backup on save” has nothing to do with the automatic hidden saving of files. That’s why I didn’t bother showing that part of dialog when I was talking about the feature I was describing.

    At this point, it looks like you’ve got your original problem sorted. Hopefully, my explanations (even if you don’t fully understand them) have started bringing you closer to understanding how file saving works. Good luck.



  • I for one am very uncertain how someone that has had some level of exposure to Notepad++ from Feb 22, 2017 (and possibly even earlier than that) can have such a confusion about how basic Notepad++ concepts work.



  • @Alan-Kilborn said in How Do I Keep Multiple Tabs Saved in Notepad++?:

    I for one am very uncertain how someone that has had some level of exposure to Notepad++ from Feb 22, 2017 (and possibly even earlier than that) can have such a confusion about how basic Notepad++ concepts work.

    I nominate @PeterJones for Saint-hood! (He’s “listed” only a “Monsignor”, but after this exchange, deserves full honors)

    Cheers



  • @Alan-Kilborn @Michael-Vincent @PeterJones

    I’m not a power user of N++. I know nothing about programming etc., but I’m certainly not computer illiterate. I only use it as a repository for links and names of video files I’ve DL. It’s the best program I’ve seen for this for many reasons.

    So until now, I have years of links with the video names stored all in one tab. It became annoying to scroll through such a long list, so I decided to break them up into categories by using the tabs for each category to make them easier to navigate through.

    So now you know why my understanding and knowledge of how N++ works is very limited.



  • @Troglo37 said in How Do I Keep Multiple Tabs Saved in Notepad++?:

    I only use it as a repository for links and names of video files I’ve DL

    Wouldn’t browser bookmarks make much more sense here? And if they’re downloaded, why not just put them in a folder structure that describes categories and name the video files with a descriptive name?

    If all you’re doing is maintaining a text list - then any text editor (Windows simple notepad.exe) would suffice and maybe not have all the other bells and whistles that may confuse you. Alternatively, a spreadsheet application (Microsoft Excel (paid), Google Sheets (free), etc) could store in columns the name, link and meta information and each spreadsheet tab could be a category.

    Cheers.



  • @Troglo37 said in How Do I Keep Multiple Tabs Saved in Notepad++?:

    so I decided to break them up into categories by using the tabs for each category to make them easier to navigate through.
    So now you know why my understanding and knowledge of how N++ works is very limited.

    … and now you know that each tab is a different file. And if you want to properly save that file, you have to give it a name and make sure you know where it’s saving each file (so that you can find those files again later, or using a different application some day in the future)



  • @Michael-Vincent I’ve tried all of those. As far as I’m concerned, N++ is better than them. I like it because of the aethectics and various features it provides.

    I began using Bookmarks in my browser as a backup about a year ago, but would never use that as my primary source.

    @PeterJones said in How Do I Keep Multiple Tabs Saved in Notepad++?:

    @Troglo37 said in How Do I Keep Multiple Tabs Saved in Notepad++?:

    so I decided to break them up into categories by using the tabs for each category to make them easier to navigate through.
    So now you know why my understanding and knowledge of how N++ works is very limited.

    … and now you know that each tab is a different file. And if you want to properly save that file, you have to give it a name and make sure you know where it’s saving each file (so that you can find those files again later, or using a different application some day in the future)

    I just checked and they’re all saved as individual files. Oh BTW, periodically I copy my N++ to an external drive as a backup in case my PC crashes.


Log in to reply