On Wed, Mar 14, 2012 at 02:44:59PM +0200, Timothy Madden wrote: > Hello > > How come on Windows ~/.vim/ is not on my &runtimepath ? I can see that > vim will load plugins there anyway. > > I would like my plugin to search the &runtimepath for an associated > python .py file to load, but I would like to include ~/.vim/ in the list > of directories to be searched, in the right place in &rtp, before the > $VIMRUNTIME directory. > > For this I would like to expand and normalize ~/.vim/, $VIMRUNTIME and > any directory on the &runtimepath.
Have you found out about expand()? :echo expand($VIMRUNTIME) => /usr/local/share/vim/vim73 :help expand > But I found no way to get the canonical / normalized file name > appropriate for the current platform. All I could do was to get the > right slashes, which happen to be correctly output by the glob() and > globpath() functions, but I have as yet no way to get the right case > (upper-case/lower-case) for case-insensitive file-systems, so now I > have to resort to :lcd to each of the enumerated directories, to get the > canonical name. > > What is the way to get a file name with the correct case and path > separator ? You may also be interested in fnamemodify() :help fnamemodify Cheers, Erik -- Erik Falor http://unnovative.net Registered Linux User #445632 http://linuxcounter.net
pgpZT1bf2Utj1.pgp
Description: PGP signature
