On 14.03.2012 16:27, Erik Falor wrote:
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
expand() and fnamemodify() will not convert slashes to backslashes on
Windows, and will not return the path names with their exact case from
the file system.
But anyway, I was wrong to consider that an Windows installation of Vim
will load plugins from the user's ~/.vim/ directory as on Unix. On
Windows only the ~/vimfiles/ directory is used.
Thank you,
Timothy Madden
--
You received this message from the "vim_use" 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