sponsor Vim development Vim logo Vim Book Ad

perdirvimrc: Autoload vimrc files per di : Loads vimrc files that are above the opened file in the directory tree

 script karma  Rating 36/11, Downloaded by 1254    Comments, bugs, improvements  Vim wiki

created by
Wolfgang Plaschg
 
script type
utility
 
description
This script loads Vim configuration files at startup beginning
from the root directory down to the current working directory.

This is useful when you want to to set up a specific configuration that
is only loaded when you edit files within a certain directory.

Let's look at a common situation. To configure Vim depending on your
project, your tree would look like this:

~/projects  .................................. Your programming projects
~/projects/.vim  .......................... Vim settings for all your projects
~/projects/c-projects  ................ Your C projects
~/projects/c-projects/.vim  ........ Vim settings for your C projects
~/projects/php-projects  ........... Your PHP projects
~/projects/php-projects/.vim  ... Vim settings for your PHP projects

When you open the file ~/projects/c-projects/main.c the plugin loads
this files in the given order:

~/projects/.vim
~/projects/c-projects/.vim

The scripts autoloads files with the name

      _vimrc
      _vim
      .vimrc
      .vim

 
install details
Copy "perdirvimrc.vim" to your local plugin folder.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
perdirvimrc.vim 0.2 2009-09-27 6.0 Wolfgang Plaschg - removed unix-specific bugs
perdirvimrc.vim 0.2 2009-09-23 6.0 Wolfgang Plaschg - per directory vim-resources are (re-)loaded after BufRead events (File open, Buffer change etc.)
perdirvimrc.vim 0.1 2009-09-20 6.0 Wolfgang Plaschg Initial upload
ip used for rating: 54.80.121.186

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
SourceForge.net Logo