how to set default sort order for document list
-
I would like the document list to always be sorted by name.
As it is I have to click the header every time I open notepad++.
Is there a setting or a plugin that keeps the document list sorted? -
As of now, there is no setting to save the sort order from the Document List panel.
Based on my experiments, it sorts by tab-order by default. So if you keep your tabs sorted, then the Document List panel will be in the order you want.
With more recent Notepad++ versions, the Windows menu’s Windows… action will bring up a dialog which has a Sort tabs button. When you run that command, your tabs will sort alphabetically (one time; if you open new files, they are not auto-sorted unless you hit the button again), and the Document List will update its unsorted-order to match the current tab order. (With older versions of Notepad++, there wasn’t such a feature, so an intrepid forum regular published an “auto-sort tabs (real-time)” that works with the PythonScript plugin. So if your version of Notepad++ doesn’t have the Sort tabs button, then either upgrade or you can use the PythonScript solution.)
If that’s not sufficient for you, you are allowed to make an official feature request, as described in our FAQ.
-
@PeterJones said in how to set default sort order for document list:
With older versions of Notepad++, there wasn’t such a feature
I just went back as far as v7.6.3 from 2019, and it still had the feature. Apparently, I had just forgotten it had been there for years.
So I will rephrase:
- If you are willing to do it manually, Windows > Windows… > Sort tabs will sort the tabs, which also updates the order in the Document List panel
- If you want to sort tabs live, use the PythonScript plugin and the script I linked to
- If you really want Notepad++ to remember the Document List panel sort order separately from the tab order, then read the FAQ and follow those instructions to make an official Feature Request that will be tracked
-
@PeterJones Your TAB SORT suggestion will do nicely. Thanks!
-
@clyfton-in FYI I created a new issue for this problem, since I don’t use tabs (not enough screen space to display them!) and I’ve not seen a one-shot sort function used in a column header in any app before so I found the behaviour rather confusing until I stumbled upon your post which identified the issue (so thanks!).
Permanent sorting order for Document List panel #11143
https://github.com/notepad-plus-plus/notepad-plus-plus/issues/11143