Possible Duplicate:
Vim: apply settings on files in directory
vim can be configured with settings like tab size and expanding tabs to spaces based on filetype.
I want to configure editing settings for vim for the source files in my product but I don't want to set a modeline in each source file, and I don't want to rely on many per-developer settings in ~/.vimrc.
I want to put settings in one or two files in the top-level folder of my product source tree and have at most very simple per-developer settings in ~/.vimrc so that their vim sessions will look for the project configuration whenever they are editing a source file in that project.
I don't want the top-level folder to be preconfigured in ~/.vimrc because I would like to check out the product source tree to more than one location at any time without reconfiguring ~/.vimrc so I expect it really would have to be found by iterating through the parent folders from the location of the source file being edited. Once the config file is found I'd expect it to be interpreted like ~/.vimrc or a modeline.
Is there a solution like that?