Can I have a .vimrc file in local folder, so that each time I open files in that folder, vim will automatically load that .vimrc file? so that I can have different settings in different folder?

1 Answer 1


Yes. See :help 'exrc'. But don't skip the part that says: BETTER NOT SET THIS OPTION!

We also have a few earlier questions for which the answers detail alternative approaches.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.