Hello,

Ilia N Ternovich <[EMAIL PROTECTED]> wrote:

> Someone noticed that if I add this line into .vimrc:
> autocmd BufEnter * :cd %:p:h
>
> I'll be able to run :make and vim will automatically look at the directory
> where currently opened file is located for Makefile.

You can use plugins like project.vim or local_vimrc [1] to set your 'makeprg'
when the current path is under your ProjectDir.
The typical setting for &makeprg would be
    cd /abs/path/to/ProjectDir ; make $*


[1] http://hermitte.free.fr/vim/ressources/vimfiles/plugin/local_vimrc.vim

HTH,

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

Reply via email to