Tuesday, October 25, 2011

Re: Please fix: make Windows Vim use same files as unix. No reason not to and it's confusing in mixed envirionments.

On Oct 25, 2:52 am, Linda W <v...@tlinx.org> wrote:
>
> Comments:
>
> 1) that .vim isn't searched for in the same way with 'vimfiles', is a
> rather glaring BUG, given the above.   It's incompatible with the
> documented procedures for checking the names of .vimrc, .gvimrc, and .exrc.
>

But, unlike the .vimrc/.gvimrc, any number of directories can be in
the runtimepath. There is only one .vimrc. If a .vimrc is found,
_vimrc won't be used at all (or maybe it's the other way around,
regardless, only one is sourced). With the runtimepath, you could
potentially have both vimfiles AND .vim in the path, and source files
from both.

The only reason Vim uses vimfiles at all on Windows, is that on
Windows, 'runtimepath' defaults to including vimfiles instead of .vim.
We could default to include BOTH, however this could easily break a
lot of systems already out there, for example if they symlink .vim to
vimfiles so they can use the same config on Cygwin/Linux.

You could do something fancy like check for the existence of both and
only add .vim if both exist by default, but it's hard to know what's
correct. And it's trivial to do what you want in vimscript.

MAYBE the best solution would be to have some logic in
vimrc_example.vim, which is sourced by default on a fresh Windows
install, which checks for the existence of .vim/vimfiles and sets the
runtimepath differently if .vim exists but vimfiles does not. But I
don't think changing the default value in the C code is a good idea.
It would break tons of systems in use now, and make documentation in
Vim and on the Internet outdated.

--
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

No comments: