On 2015-10-14, Tony Mechelynck wrote: > On Tue, Oct 13, 2015 at 6:36 PM, Gary Johnson wrote: > > When I open a directory containing symbolic links to other > > directories, those symbolic links appear among the regular files, > > not among the directories. I think it would be better to group the > > symbolic links to directories with the regular directories. > > > > I didn't see a configuration variable for this. I'm using Vim > > 7.4.865 and netrw v154h on Fedora 14. > > > > I started vim as follows to avoid my customizations. I keep the > > netrw plugin files in a separate directory in my runtimepath, > > ~/.vim/netrw. > > > > $ vim -N -u NONE --cmd 'let &rtp="~/.vim/netrw,".&rtp' --cmd 'runtime > > plugin/netrwPlugin.vim' . > > > > Regards, > > Gary > > In order to decide whether a given link is to a directory, an ordinary > file, or something else, it is necessary to resolve the link all the > way. The "ls" utility, when invoked with --indicator-style other than > =none (or with one of -p, -F, --classify or --file-type) adds a / to > directory names, but not to the names of symlinks to directories. So > in order to satisfy you, netrw would have to resole all symlinks (for > instance by invoking "ls -ld" for each of them separately) which would > increase the required processing and disk access time, perhaps beyond > reason depending on how many symlinks there are in the directory being > browsed, and on how many degrees of indirection each of them > represents.
'ls -lF' does add a / to the names of directories referenced by symbolic links. Nautilus, ranger and 'ls --group-directories-first -L' group symbolic links to directories along with regular directories as I have suggested. Any extra processing time would not be noticeable. As an experiment I created two directories: one containing 100 directories and the other containing 100 symbolic links to those directories. In each of the containing directories I executed 'ls --group-directories-first -L' 1000 times in a loop. Listing the directory of regular directories 1000 times took 1.3 seconds; listing the directory of symbolic links to directories 1000 times took 1.5 seconds. > I'm CCing Dr. Chip Campbell (the author of the netrw plugin) because > in everything concerning netrw enhancements, he of course has the last > word. Of course. I believe he follows this list. Regards, Gary -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
