> pansz wrote:On Wed, Oct 26, 2011 at 9:23 AM, Linda W<vim@tlinx.org>wrote:But I asked how it would be incompat if it looked for .vim, if found, then don't look for vimfiles.?You always have multiple runtimepath, at least you have ~/.vim and /usr/share/vim/vim73 as the runtimepath. If you ignore any others after looked for ~/.vim, then the system path would be ignored.---
> you would only not look for 'vimfiles' in the user dir's where you found a ".vim"...
> you'd still process the path normally. Just if you find a .vim then stop searching in that
> dir and begin processing the next.
Vim doesn't "search" for .vim or vimfiles.
You tell it exactly what directory or directories to use.
By default, you tell Vim to use ~/vimfiles on Windows, and ~/.vim on
Unix. There is no searching, no "if this directory exists use it for a
Vim config", or anything like that. Any directory in 'runtimepath'
which exists is used. Users could even use both .vim and vimfiles,
something like:
set runtimepath=$HOME/.vim,$HOME/vimfiles,$VIM/vimfiles,$VIMRUNTIME,
$VIM/vimfiles/after,$HOME/vimfiles/after,$HOME/.vim/after
Setting up a variable "if this directory exists, don't use this other
directory" would be a change to the very NATURE of the 'runtimepath'.
The correct solution to this problem, if people can agree there is a
problem at all, would be to set the value of 'runtimepath' based on
the presence/absence of a $HOME/.vim directory. While this can be done
internally in Vim's C code, setting a different default value based on
the presence/absence of such a directory, I think this would be even
more confusing than the current situation. I think the real solution
is the trivial vimscript snippet shared earlier, added to the very
beginning of a .vimrc:
if has("win32") && isdirectory(expand("$HOME")."/.vim") && !
isdirectory(expand("$HOME")."/vimfiles")
let &rtp = "$HOME/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/
after,$HOME/.vim/after"
endif
This could even be part of the default _vimrc installed on Windows,
for the sake of people coming in from Unix.
I do note that the Vim installer (or at least, the Vim without Cream
installer I use most of the time) it specifically gives an option to
create a vimfiles directory for you. I would think this is already
hint enough, personally.
--
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:
Post a Comment