Hi, thanks a lot to added this feature "folder as workspace", I used save/upload session but it was not easy.
Any more, it should be nice to allow alphabetic sort the files. I try to understand how it is done but can't find, it seems not sort on created date or last change?
Very strange : as I mentioned above, on a new installation under windows 7, files appears unsorted.
I am surprised to see files correctly sorted on my usual computer where I just installed v6.9 but where previous v6.8.x was installed !
Regards
bcag2
Hi,
I actually see the opposite. I installed 6.9 on top of my existing 6.8.x install, and the files are sorted by, I believe, is 'last modified' date.
I would love to see the following sort options:
I don't think it's necessary to show the info in the workspace view, just have the option to change how the files are sorted.
Cheers!
GallifreyMage
+1 to see npp have _sorting functions_ for content within Folder as Workspace
@GallifreyMage suggested the following (_I also agree with these and there should always be room for even more_):
I would love to see the following sort options:
- alphabetical (default)
- last modified
- file extension
At the very least why not have an option to _manual sort_?
+1 (assuming alphabetical would be folders first then files)
If you are using a samba share, as I am, then the following option can be used to serve up a sorted file list:
vfs objects = dirsort
Reference: https://www.samba.org/samba/docs/man/manpages/vfs_dirsort.8.html
Just added entire Linux kernel tree and workspace is not usable without sorting the files by filename.
+1
I want the method of sorting by alphabetical.
+1
+1 Also want sorting by alphabetical. Surprised it's not the default actually
+1 I need it
+1 I need it, too!
+1 (assuming alphabetical would be folders first then files)
+1 For me, the strange sort happens whenever the file changes within the tree. If I switch branches in git, then the sorting is changed. New or changed files are at the bottom. But when I first open npp, then the sorting is as expected, by name.
This changes my workflow so much that I'm tempted to fix it myself. In fact, I'm downloading VS now.
Version 7.5
Same here, I am using the folder as workspace functionality very often to check and compare EDI-Files. Since I usually need to rename them in order to make them readable und appear in the correct order faw makes me real crazy. Please consider to add some kind of a human used sorting algorithm instead of letting the system decide how to sort.
+1. Have the choice among some sort strategy would be cool at most (it's a feature request), but at the very least, the files should be sorted by filename (and this can be considered as a bug report).
I don't think that some date/extension sorting would really be useful. Please consider adding a fixed alphabetical order asap...
+1
Plus One
+1
+1
Folder as Workspace is such a useful feature. I look forward to it becoming even better with sorting!
+1 for alphabetical - (the other options are nice, but needed rarely, i guess) couldn't find a work-around which solves the issue satisfying (like the samba parameter or other tricks to pre-sort the directory()
+1 would love to have some sorting options.
+1
Alphabetical sorting by default would make sense.
If we had sorting options - nice, but not necessary.
+1
Unsorted workspace is useless...
+1
https://github.com/notepad-plus-plus/notepad-plus-plus/issues/1541#issuecomment-219262335 yep, manuall is also convenient, btw. we have this in Project, but not in Folder as workspace.
+1
+1
me too ! ; - ))) + 1
+1 for this feature
So many supporters :)
I'll have a look on this today/tomorrow.
All the best,
Robert
set dircmd=/ogen environment variable sorts the files for me
bubbajdf - Sorry, but I don't even know what this means
Set a new Windows environment variable.
Name is: dircmd
(may need to be upper case - not sure)
Value: /ogen
Maybe reboot then they are sorted (for me at least alphabetically)
I have known about this command for years (from working in DOS). For dir command
Can I ask where you got this from, it seems just a little obscure ?
Thanks for coming back
Wow, this issue has been open for over two years. It seems like the fix would be relatively simple.
+1 Alphabetical and/or manual sort would be helpful.
bubbajdf,
I can say (under Windows 10.1079 Home) that this does not work for me.
UMH
Edit :- have undertaken multiple reboots and opening and closing of notepad++, still no workie
Close notepad++ and reopen it resorts the files alphabetically for me (with the environment variable set).
Edit: Strange, dos prompt (search bar type: cmd ), type SET. Do you see DIRCMD=/ogen
NOTE: The root folders are not sorted, the files in the folders and directories are (for me)
+1
bubbajdf, your tip does not work for me neither
I think i realize the confusion. When I add a folder, with the environment variable
set dircmd=/ogen set,
the subfolders are sorted. However, if you add another folder, its not sorted. For example, add a source folder. That shows up first in the list. Add another folder called Docs, that shows up below source. subfolders in both of those are sorted however (for me at least).
I use npp for development in a particular language. I run into this whenever I switch branches in git. The directory structure is drastically changed and is no longer sorted. It’d be nice if it sorted whenever there is a file system event.
There is a danger that system events could be frequent enough to trigger this too often.
I would be happy if there was simply a "refresh tree button".
This would not only have to refresh the tree alphabetically (or alternatively however their required sort requires) but the other thing I have noticed is that if you use n++ to create a file, it does not get added to the tree even if it's within one of the tree folders.
I have been forced to delete the whole tree and rebuild it in alphabetical order
The tree is already automatically refreshed when there are filesystem events. I do it a lot throughout the course of the day. It just needs to be sorted after it’s refreshed.
Currently, the most recently modified files are placed at the bottom of the tree. Or that’s what it seems to be doing.
Just passing by to say that this feature would still really be appreciated.
Thanks!
Hi, just adding a "me too" to maxthiel's comment
Cheers
+1
+1
+1
Indeed, this feature should be there.
Questions for the developers :)
How are files sorted now in workspace? Are sorted by modification time? (I think no one remember his files by modification date, this is hilarious, PLEASE come with a solution to sort files and folders from workspace in alphabetically order or even better I would like to see manual order :) )
Thanks!
@standoski Not a dev, and I don't know the sort algo for this, but mod time CAN be an effective order because it shows you MRU.
It IS sorted alphabetically, or am I missing somethings?
From what I remember, the workspace was initially sorted when loaded, but never after. For example, if a file was renamed or new files were added to the workspace. New files are just added to the bottom instead of being resorted.
It IS sorted alphabetically, or am I missing somethings?
I think one of us here must be... I can guarantee my "folder as a work-space" is not sorted alphabetically. closing and re-opening the folder does not help.
If I add this directory to a standard workspace/project, it also remains unsorted alphabetically, and if there is an option to do so, I sure can't find it. This makes locating files in the directory very difficult.
I am using version 7.6.6
On two Win 7 machine running 7.5.9 the workspace is sorted by name (updated files are always at the end though). I installed 7.6.6 on another Win 7 and there is not sorting. Not sure if the function is broken in the new version, or if it is never really fixed.
Not sure how a workspace without sorting will be useful. At this moment I will try v7.5.9 and disable auto-update to see if it will work.
On two Win 7 machine running 7.5.9 the workspace is sorted by name (updated files are always at the end though). I installed 7.6.6 on another Win 7 and there is not sorting. Not sure if the function is broken in the new version, or if it is never really fixed.
Not sure how a workspace without sorting will be useful. At this moment I will try v7.5.9 and disable auto-update to see if it will work.
Updated to 7.7. No help.
Downgraded to 7.5.9. No help.
Finally I have figured out why the sorting is broken on some machines but not the others. It turns out that if the folder is from a regular local disk or a network drive on a Windows machine, the sorting will be fine. If it is from a shared folder from a Mac, or from a virtual disk, the sorting will not work.
Not sure about the last comment, from stolen boot.
I run notepad+ on Windows 10
The files I read/write to are :-
A) local on the d:\
B) on a samba shares on various raspberry pi's (various os's including raspbian, tiny core, hassio)
C) on a NAS share (so another samba share running on a Linux variant)
None of them have the sort order survive the first additional file being save to those workspaces.
It's impossible to find some files, so I'm generally forced to periodically clear the tree and reload it till the next time.
Sorry for not describing it clearly.
I have installed NPP on multiple Win 7/10 machine and file sorting in workspace works. I recently installed NPP on a Win 7 virtual machine running on a Mac. File sorting in workspace doesn't work. I have installed several version of NPP (7.5.9, 7.6.6, 7.7) and they all behave the same. I copy the setting files to the VM and it didn't help.
I have been annoyed by this and have been searching for help. Finally I came to this page: https://notepad-plus-plus.org/community/topic/11405/feature-request-sort-by-file-name-in-folder-as-workspace
Linpengcheng suggested in the post that the location of the folder may be the reason, and I tested and confirmed it. Here is the result
On the VM, sorting works when the folder is on
Local hard drive
USB drive
Another Windows 7 machine (not VM)
On the VM, sorting fails when the folder is on
Host Mac
WD NAS (MyCloud, 6TB, running some sort of Linux)
Worrying that results from the VM may not be typical, I also tested on the regular Win 7. Sorting also failed when the folder was on the WD NAS.
So it is clear to me that whether sorting works or not depends on where the folder locates, at least on Win 7. I haven't tested it on Win 10.
Wow,
That's a very comprehensive set of tests. I can't comment on these as their would seem to be gaps when you overlay our Venn diagrams. I compliment you on your data and thoroughness.
Regardless, given that the changes I experienced were made by/through npp, I would have thought that this could trigger a reload of the listed tree spaces and files. And even if if didn't, how about a button that does it manually ? (probably not as the trigger is easier than the reload (probably))
Anyway you've added data to the case for this to be investigated further.
I kind of think these two issues are connected. I suspect that NPP is using an API to read the content of a folder (maybe ZwQueryDirectoryFile?) and relies on Windows to do the sorting. If this is true manual refreshing may not work, as Windows may buffer the change and simply append the changed files to the end, as we have been experiencing.
If reading and displaying the tree are not done using a single API, the solution is quite simple - do a sorting after reading the folder. With that NPP can have consistent and customized sorting, and refresh will work.
I had a solution that sorted the files and folders and re-sorted when a new file was a added or renamed. However, it was rejected due to the confusion on whether or not it was already sorted.
Yeah that would be funny if it wasn''t so frustrating.
Power to your keyboard jmb
Hopefully ... 'someone' will read this and accept that there is STILL an issue.
Fingers crossed guys !
With version 7.7.1, my workspace containing a network drive is still not sorted; look at the numbers (I removed the part of the filenames after the numbers.)
This happens if I add the network drive directly to NP++, but also if I add it via a mapped network drive.
This snapshot shows files, but also my folders are not sorted.
There's no trivial solution for this issue.
If I use TVM_SORTCHILDREN, then all the folders of the same level won't be grouped together and they will be sorted with all files - which is certainly not an expected behaviour.
So the customized sorting by using TVM_SORTCHILDRENCB seems the only solution for me. However, the callback fuction of type PFNTVCOMPARE that I should define doesn't provide the name (label) of item but only lParam of TVITEM - which has been used for something-else.
So I have no solution currently. If you have any other idea to implement this feature, please let me know.
Do you mean to say you are not using a list to contain the names of files
and folders?
On Wed, Mar 25, 2020, 10:35 PM Don HO notifications@github.com wrote:
There's no trivial solution for this issue.
If I use TVM_SORTCHILDREN
https://docs.microsoft.com/en-us/windows/win32/controls/tvm-sortchildren,
then all the folders of the same level won't be grouped together and they
will be sorted with all files - which is certainly not an expected
behaviour.
So the customized sorting by using TVM_SORTCHILDRENCB
https://docs.microsoft.com/en-us/windows/win32/controls/tvm-sortchildrencb
seems the only solution for me. However, the callback fuction of type
PFNTVCOMPARE
https://docs.microsoft.com/en-us/windows/win32/api/commctrl/ns-commctrl-tvsortcb
that I should define doesn't provide the name (label) of item but only
lParam of TVITEM
https://docs.microsoft.com/en-us/windows/win32/api/commctrl/ns-commctrl-tvitema
- which has been used for something-else.
So I have no solution currently. If you have any other idea to implement
this feature, please let me know.—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/notepad-plus-plus/notepad-plus-plus/issues/1541#issuecomment-604194022,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEFHH5IYW3AL2DVO3VKPYP3RJK5QHANCNFSM4B4GNJBA
.
@xucaen I was saying that the callback function of MS provides nothing but customized info.
If the source code is available I can take a look.
On Fri, Mar 27, 2020, 8:54 AM Don HO notifications@github.com wrote:
@xucaen https://github.com/xucaen I was saying that the callback
function of MS provides nothing but customized info.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/notepad-plus-plus/notepad-plus-plus/issues/1541#issuecomment-604984669,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEFHH5ISYA226TM3GGS24ZTRJSOZHANCNFSM4B4GNJBA
.
I must say that I've lost the will to live and just can't be bothered anymore.
I have moved onto VSC (Visual Studio Code) it sorts everything dynamically and has the ability to track multiple files under the same indexed path (not just the ones loaded). All the usual tricks of an advanced 'editor'
Thanks to coronavirus, I've got more time to think of this problem and to implement it because I'm in the confinement.
I'm working on it, and it's in progress.
FYI
This feature is implemented and merged into the master. It'll come with the next release (v7.8.6).
I've been waiting 4 years for this! Very excited, thank you!
Where is the button/option/etc?
From what I have observed the app monitors the folders and updates the list automatically and is sorted by default.
Just what the doctor ordered :+1:
I just installed 7.8.6. The files in the 'Folder as workspace' pane still have the same order as they had, which means they are not sorted alphabetically. Do I have to enable the feature somewhere?
@ernstblaauw
Sorting seems to be working from a quick trial I did with 7.8.6.
There's no "enable" that I know of.
Maybe you want to explain what you're seeing in a bit more detail; some screenshots?
It's entirely random, or perhaps based on file creation date.
Same Folder in "Atom" text editor:
This bug has existed for a long time and no one seems interested in fixing it. (sorry, having a bad week) It is the entire reason I switched to "Atom", which I don't like as much, but not sorting the folder view makes Notepad++ unpleasant to use. If it's user error on my part, I wish someone would explain how to fix it.
has existed for a long time and no one seems interested in fixing it
But there _was_ interest in this enhancement...and it _was_ attempted, see above.
If it didn't "hit the mark" for everyone somehow, I'm sure there is interest in resolving that.
For me, I tried opening a FAW in a folder where there was no correlation between name and timestamp and the view presented was alphabetized, so I can't reproduce the issue.
But @Dream-Cypher I have to question what version you are using, because in 7.8.6 the UI should look like the following and not like what you show in your FAW screenshot:
Okay, I was ready to just leave this alone but give the guy a break.
The update worked for me :+1:
I opened my monitored folders, they were all sorted, I created a file in the structure and it just appeared in the right place.
Generally this seems pretty good and I'm sort of regretting moving to VSC (I run them both now)
Maybe with your feed back the bugs can be removed
I apologize for the attitude. Having a bad week. I appreciate the efforts
You are correct, the screenshot was taken prior to the update, it's just no different.
Strangely, adding a new folder as a workspace is sorted, and the fix seems to be working for others.
Strangely, adding a new folder as a workspace is sorted
And I'm sure the answer will be in the negative, but I have to ask: If you remove _Notes_ as a FAW and then re-add it, does it then sort correctly? No idea why it might do this, but, you know, gotta-ask...
Correct, I tried re-adding it many times.
BUT, I think I may have identified what is the culprit, or at least a part of the issue.
At some point, I moved my "Notes" folder to Google Drive, and have accessed it through "Drive File Stream"... and that seems to be the issue now. (if you are not familiar, Drive File Stream maps Google Drive files to a drive letter)
If I copy the folder to a local or standard windows network drive, sorting does work now. Perhaps Google is not providing the correct responses to whatever API/method is being used for sorting the files. (Though I have not noticed this in any other appliction.)
Edit - Also, adding another folder that exists on the Drive Filestream drive letter also results in incorrect sorting.
@ernstblaauw - Where is the folder you are using as a workspace stored?
Strangely, adding a new folder as a workspace is sorted
And I'm sure the answer will be in the negative, but I have to ask: If you remove _Notes_ as a FAW and then re-add it, does it then sort correctly? No idea why it might do this, but, you know, gotta-ask...
I have two entries in the workspace. I discovered that the one that I don't use, is actually sorted now.
This all happens on a server. The correctly sorted folder is added using a UNC path, as it resides on another server.
The one that is not working, is my 'home' folder - but I believe that is also a network drive, but mapped to a drive letter. I tried adding the folder using the UNC name, but that did not make a difference.
As I don't have a lot of rights, I actually don't know how much I can investigate. Which information do you need to look into this further?
@ernstblaauw It seems the key might lie in what might be different about what is behind your two UNC paths, so if you can find out anything more about those...
I can confirm that files in remote folders on a Mac are not sorted. Mounting the folders as local drivers didn't help. Removing and readding the folders also didn't help.
I did not find out a real difference. Three differences that might help:
Both shares do not pop up when I execute net share
in a command prompt window (without admin rights - because I don't have those rights on the server).
I hope this helps
@ernstblaauw @Stolenboot @Dream-Cypher
So do you confirm that non-sorted files come from the drive of network but not local files?
If so could you confirm that all your local files are sorted?
Could you also post your Debug Info (via Menu ?
->Debug Info...
) please?
I don't have local files I am allowed to access - so my observations are from network shares only. One network share is sorted, the other one is not. See my post above for my findings.
Here is the debug info:
Notepad++ v7.8.6 (64-bit)
Build time : Apr 21 2020 - 15:23:03
Path : C:\Program Files\Notepad++notepad++.exe
Admin mode : OFF
Local Conf mode : OFF
OS Name : Windows Server 2012 R2 Standard (64-bit)
OS Build : 9600.19505
Plugins : mimeTools.dll NppConverter.dll NppExport.dll
I'm also on 7.8.6 64 bit, using a USB drive as workspace and it's not sorted alphabetically.
I think the root of the problem is that Notepad++ relies on the order what the operating system says (that is what the FindFirstFile and FindNextFile says). NTFS stores files in a B-tree so it's sorted out of the box. On the other hand FAT32 (which is used on pen drives), doesn't sort files in any way.
Current 7.8.7 version doesn't fix this, the workspace folder still in random order.
So the bugfix for this needs to be tested on a filesystem that is not sorted internally such as FAT32 on a pen drive.
It should just sort itself before displaying it
On Sat, Jun 20, 2020 at 12:24 PM Calmarius notifications@github.com wrote:
I think the root of the problem is that Notepad++ relies on the order what
the operating system says (that is what the FindFirstFile and FindNextFile
says). NTFS stores files in a B-tree so it's sorted out of the box. On the
other hand FAT32 (which is used on pen drives), doesn't sort files in any
way.
Current 7.8.7 version doesn't fix this, the workspace folder still in
random order.So the bugfix for this needs to be tested on a filesystem that is not
sorted internally such as FAT32 on a pen drive.—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/notepad-plus-plus/notepad-plus-plus/issues/1541#issuecomment-647016430,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AF26DTAMCQ5RPBUGMFE6BYLRXTPEVANCNFSM4B4GNJBA
.
It randomly decided to sort alphabetically, then I downloaded 7.8.7 today and it went back to the incorrect sorting method :/
Hello,
Using the latest "Stand with Hong Kong" version and the folders are randomly sorted in Workspace folder view for me.
Hope to see some sorting options soon, like alphabetical (asc, desc), modified date (first, last) etc.
My regards.
Having installed the latest version 7.8.7 shows that the file sorting on name is working for local drives, but does still NOT work for USB drives and other NTFS network systems. So the filename sorting order in the Workspace has to be done in NotePad++ itself (after getting the file list from the operating system).
Please REOPEN this issue.
Hi,
I've just installed 64-bit v7.8.9, and also still see apparently randomly ordered files and directories, accessing files on a samba mount with UNC path.
Great to have the workspace feature here, thanks, just not quite perfected yet.
Most helpful comment
FYI
This feature is implemented and merged into the master. It'll come with the next release (v7.8.6).