I recently updated my vim to v8.1.1888, including netrw which is now v165.
When sorting by name directories and files are now mixed up, which was not the case before.
I'm not sure whether this is a bug or if I didn't get how to use g:netrw_sort_sequence, but this variable seems to be ignored which could be the cause of the initial issue. I've tried various sequences including the default one, but the file listing seems unaffected.
Please see the following screenshot:
As far as I can tell, the sort sequence should move directories first, then jpg files, then pdf files. The listing is unaffected and sorted solely by name. :h netrw-sort-sequence clearly states that this variable should be used when sorting by name.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
btw, looks the 'g:netrw_liststyle' did not work as well ..
though the cmd 'i' would be able to change the listing style still ..
so probably it can be handled with this together ...
my version is v8.1.1845
It looks like this happens only for details view (i.e., liststyle = 1). It seems to be working fine in other listing styles.
Right, I can confirm that this happens with the detailed view.
It looks like this happens only for details view (i.e.,
liststyle = 1). It seems to be working fine in other listing styles.
looks no, my current default setting is 'netrw_liststyle = 3', but it did not work fine.
my cur vim version is v8.1.1943
I think I found the problem. In the following line:
Change the \t in the replacement string to \\s and it should start working. This might still fail when dealing with files with spaces. I think that was the reason for using \t here, but it won't work because the long-list rendering currently doesn't use tabs.
I'm not raising a PR since I'm not sure of this. I'm putting it here so someone better informed can take a call.
looks that due to 'list hide' that (code/rule) was sth changed, if it's 'tree', there maybe some 'space' ahead the file/dir name, not sure why now it made that do not work as expected.
when redraw the 'list hide', it works fine now - i mean the 'liststyle = 3', probably the issue you faced about 'sort' was related.
so sometime some code modification were contextual related unless the original author knew the all. :)
btw, if the dir was a 'link', the behaviour in the 'vim' itself and 'netrw' looks a little different, and in the linux and windows/cygwin maybe a little different too, but looks 'netrw' handle it well, just saying that sometime impact the result a little expected too ...
the rule was '^..*' and worked in the past.
looks the 'space' now is counting.
'^..*'
um... the github ate an 'escape' after '^'. -_-#
'^\..*'
The rule ^\..* won't have a problem with the bug reported in this issue. You'll only be affected if your patterns use the $ atom.
PS: Use the backtick marks to wrap code in your comments and GitHub will not remove backslashes. See https://guides.github.com/features/mastering-markdown/.
just saying that's in 'doc' it would hide the 'hiding' files/dirs if such rule, if i did not recall wrong.
but now, looks the code changed (a lot), it would hide all (if listtype=3) now, or maybe a bug.
sorry jumping here :) maybe mess-up the original question here, but just saying netrw looks changed a lot - not stable - that's in common which we faced. :)
or maybe an improvement ?! :)
since that rule would be treat as '\.' as well, maybe now it's saying it's hiding the current dir all.
all in all, just saying netrw changed a lot which maybe not back-compatible. bad news or good news ? :)
The issue is that the sort regex is being applied to the entire line in the long list format, rather than just the filename. Here's an illustrative example:
4 Files in alphabetical order with sort by liststyle=1
abc 0 Wed 25 Sep 2019 12:00:00 AM PDT
def 0 Fri 25 Oct 2019 12:00:00 AM PDT
ghi 0 Mon 25 Nov 2019 12:00:00 AM PST
jkl 0 Wed 25 Dec 2019 12:00:00 AM PST
But if I configure let g:netrw_sort_sequence = '.*Oct.*', I get:
def 0 Fri 25 Oct 2019 12:00:00 AM PDT
abc 0 Wed 25 Sep 2019 12:00:00 AM PDT
ghi 0 Mon 25 Nov 2019 12:00:00 AM PST
jkl 0 Wed 25 Dec 2019 12:00:00 AM PST
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
Also, as a good enough work around until this is addressed, I'm just going with something like let g:netrw_sort_sequence = '[\/]\s'
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()