Hello,

Andrea Spadaccini <[EMAIL PROTECTED]> wrote:

> I'd like to load some settings when I enter in a directory, like for
> instance setting makeprg.
>
> Is there a way to do it?
> Thanks in advance from a lurker! :)

I know mainly two ways to do this correctly. By correctly I mean that the
configuration file is searched in the directories containing the current files
we want to compile -- the projects I work on have a complex directories
hierarchy, and I don't want to maintain redundant settings.

The first way is acheived with the plugin Project. It permits many things. Among
them, we can set options and other variables on projects basis.

The second way is acheived with plugins that search for configuration files in
directories from the directory of the current file up to $HOME, root (/), or
any other specific directory. The solution is very similar to the one posted by
Yakov.
I know two plugins, having the same name (local_vimrc.vim), that implement this
feature. I'm maintening one of them. Both are on sourceforge. It seems the
latest version of my script hasn't been uploaded for a while ...

HTH,

--
Luc Hermitte
http://hermitte.free.fr/vim/

Reply via email to