James Kanze wrote:
> Whether a file is executable or not seems to affect the sort
> ordering in netrw.  In my .vimrc, I have:
>
>     let g:netrw_sort_sequence='[\/]$,*,\.o$,\.info$,\.swp$,\.obj$,\.bak
> $,\.orig$,^\.'
>
> (All on one line, in case something screws up the formatting
> along the way.)
>
> In one particular directory, which contains some shell scripts
> (.sh), I get:
>
>     ../
>     Gabi/
>     comp-gcc/
>     comp-suncc-stlport/
>     comp-suncc/
>     comp-vc80/
>     conf/
>     syst-posix/
>     syst-windows/
>     GNUmakefile
>     makeVariants.sh*
>     makeVariants.sh.orig*
>     makeVersion.sh*
>     makeVersion.sh.bak*
>     makeVersion.sh.orig*
>     .makeVersion.sh.swp
>     GNUmakefile.orig
>     .nfs005545560000041a
>     .nfs005545580000041b
>
> With the .orig and .bak of the executable files ordered without
> regard to the sort sequence.  (Adding \.bak\*$,\.orig\*$ to the
> list fixes the problem.)  This seems like a bug to me; I would
> have expected the sorting to take place before the * got added.
> (But wouldn't this prevent using the sort ordering to get the
> directories to the top?  So maybe it isn't a bug after all, but
> a feature.)
>
> Or perhaps there's some way of turning off the *; syntax
> highlighting displays it in a different color, so it doesn't add
> anything.  (Or does syntax highlighting trigger on the * for the
> color.)  Or turning off any particular recognition whether a
> file is executable or not---I know which files should be
> executable (from the name, if nothing else), and when moving
> files to and from Windows, the x bit often gets set for files
> where it doesn't apply, so the information is in some ways
> false.  (x-bit or not, if I invoke a C++ source as a command,
> Unix isn't going to execute it.)
>   

The sort ordering process does take into account the filetype 
indicators; as you've surmised,
its how it differentiates directories from other filetypes.  The 
trailing '*' means "executable";
the syntax highlighting itself triggers on that.  Currently there's no 
way to turn that filigree
off.  I suppose I could add yet-another-option to disable most filigree 
(not the directory indicator).

Regards,
Chip Campbell


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to