Document switcher - saving state
-
Hi!
I love the way npp saves all my open documents, even those that have been edited and not saved themselves. It’s especially useful as I use an old laptop, which has a tendency to just switch itself off if I just nudge it the wrong way…
My only issue is that the order of items in the Document switcher (ctrl-Tab) does not seem to be saved. I run in MRU, so the documents I’m currently working on are at the top, and I can ctrl-Tab back and forth between them.
However, on restarting, although all my tabs are there (over 200 today… yes, I know, don’t say anything… I have several ongoing projects and I swap back and forth between them…) the order appears completely random. I’d not mind quite so much if they were in, say, alphabetical order of pathname, as at least I’d know how far down the list to look, but as it is, with the number of things I’m working on, it’s quite a hunt - I usually end up looking for a file in the right folder, switching to that, and Ctrl-O and type the filename to open the one I want, which then instead switches to the right tab.
So… is there a setting somewhere I’ve missed that ensures the document switcher MRU order is saved, or otherwise adjust the order it loads the tabs into that list on startup? I can’t find it, and neither google nor my searching in here is helping me.
TIA.
-
@Rob-O-Donnell said in Document switcher - saving state:
So… is there a setting somewhere I’ve missed that ensures the document switcher MRU order is saved, or otherwise adjust the order it loads the tabs into that list on startup? I can’t find it, and neither google nor my searching in here is helping me.
If you were to close Notepad++ and then look at the %appdata%\Notepad++\session.xml file it should contain the list of open files at the point of closing Notepad++. They will very likely be in the order you remember them. The document switcher is (I believe) the same as viewing the list of documents through the View\Document list window.
In the Document List window you are able to order the file list by name, extension or path, both ascending or descending.
What I think is happening is that Notepad++ is processing the list as per the session file when opening, but possibly as some files may be on a different drive, or because the Windows OS has processed the file requests in a slightly different order, Notepad++ receives the contents out of order to what you previously had them.
Terry
-
@Rob-O-Donnell said in Document switcher - saving state:
I run in MRU, so the documents I’m currently working on are at the top, and I can ctrl-Tab back and forth between them.
Additional to my last post, I should mention that the sorting of the tabs can also be done via the Window\Sort menu option, again name, extension and path ascending/descending.
There is also the option to manually move a tab’s position in the window. See the online manual reference here. However with 200 (approx) open files I doubt you are going to take that option, even if you could remember the previous location of a particular tab.
I will say, however that it does seem to me to be a reasonable request for Notepad++ to position the files (upon/after opening) back into their original order. The information is there, it just needs some code behind it to “sort” into the previously saved order.
The developer will allow users to put forward requests, however he makes no guarantee that they will be put into production. In some ways it does depend upon the number of users thinking it’s a great idea. To put forward a request, please read the FAQ post titled “Feature Request or Bug Report” here.
I did a quick search of the “tickets” and whilst there were many related to the tabs and ordering of, only one appeared to be very similar to your need. That was issue #4015 which was reported as being a copy of #1684 here.
Interestingly that issue was closed by the developer as “completed”, yet I see nothing that suggests it will help you. It seems to just refer to the sorting options I mentioned earlier.My thoughts, if you were to put forward a feature request, would be to ask for an option to re-sort at any point in the current session back to the original load order. Using this just before closing would then set it up for the next session.
Good luck
Terry -
@Terry-R Thank you. I’ll read through those, and possibly put in a request when I have enough time to formulate it properly!