ydjia / vim

Automatically exported from code.google.com/p/vim
0 stars 0 forks source link

Better support for g:netrw_sort_options #233

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago

Original comment by jaeho.shin on 13 Jun 2014 at 7:19

Attachments:

GoogleCodeExporter commented 9 years ago
CC to charles. (Just in case he didn't notice yet).

Original comment by chrisbr...@googlemail.com on 8 Oct 2014 at 9:07