So far, only very limited things could be done by setting g:netrw_sort_options,
because of the way sorting was done by prefixing every line with priority and a
delimiter (g:netrw_sepchr), which is to support the g:netrw_sort_sequence
setting. Instead, by sorting twice, first with user's g:netrw_sort_options
when necessary, then by the priority prefix assigned based on the
g:netrw_sort_sequence setting, it's possible to respect both settings. When
the sort direction is reversed, we can simply reverse the lines in the file
listing range.
For example, it's very difficult if not impossible to mix dot files with normal
files in the Netrw's file listing (by ignoring the dot prefix of file names)
using the g:netrw_sort_options, while still having a sophisticated
g:netrw_sort_sequence setting. Because of the priority prefix, it's impossible
to ignore the dot in the middle of each line with a :sort option. On the other
hand, if :sort is done with what comes after the g:netrw_sepchr and the
optional dot (using :sort's r option), g:netrw_sort_sequence setting is lost.
Attached is a patch to the latest runtime/autoload/netrw.vim file in hg
(version 152).
Original issue reported on code.google.com by jaeho.shin on 13 Jun 2014 at 7:19
Original issue reported on code.google.com by
jaeho.shin
on 13 Jun 2014 at 7:19