tpope / vim-vinegar

vinegar.vim: Combine with netrw to create a delicious salad dressing
https://www.vim.org/scripts/script.php?script_id=5671
2.22k stars 87 forks source link

Incorrect sort order if 'suffixes'/'su' is empty #105

Closed kiryph closed 5 years ago

kiryph commented 5 years ago

Compare following two screenshots screen shot 2018-08-06 at 21 52 00

screen shot 2018-08-06 at 21 52 12

The folders doc and plugin should still be listed before the markdown files README.markdown and CONTRIBUTING.markdown.

The code in line

let g:netrw_sort_sequence = '[\/]$,*,\%(' . join(map(split(&suffixes, ','), 'escape(v:val, ".*$~")'), '\|') . '\)[*@]\=$'

has probably to be specialized when 'suffixes' is empty.

kiryph commented 5 years ago

Thanks for the quick fix.