The Fugue Counterpoint by Hans Fugal

12Aug/060

:set exrc

Let's say you work on more than one project, each of which has different policy
about tabs (e.g. one of the only two sane tab policies: all real tabs or all
spaces). You need vim to behave one way in project A and another way in project
B. You could use modelines, but that's a violation of DRY.

The solution is something I'd often wished for but never realized vim did. set
exrc
in your ~/.vimrc tells vim to search the current directory for a
.vimrc or .exrc file. You might need a few symlinks (automatable with a
Makefile) to reach all the subdirectories of your project tree, but this will
solve all your problems.

Tagged as: , , , No Comments