How to sort `sort` files using vim netrw browser?

I would like my files to be sorted as follows:

abc.c
Makefile
readme.txt

but the browser of the netrw file sorts them like this (using an empty sort sequence):

Makefile
abc.c
readme.txt

How to fix it?

By the way, it would be nice to go to the file / directory by typing the first few letters of its name. Is it possible?

+3
source share
3 answers

netrw can really do case-insensitive sorting (which I suppose is what you want): Paste ~/.vimrcin ~/.vimrc:

let g:netrw_sort_options = "i"

netrw Vim, /. , , , FuzzyFinder Command-T.

+6

netrw . s , . , , netrw g:netrw_sort_sequence. , , , . Vim netrw-sort-sequence (:help netrw-sort-sequence)

+2

usually the Linux mapping is POSIX, so I think you just need to change the sorting like this

export LC_COLLATE=C

issue a command on the terminal on which VIM is running or put it in .profile or .bashrc, which will always be executed

+1
source

All Articles