run make! from subdirs

2007-02-20 Thread Ilia N Ternovich
Hi! 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. But if I have directory structure like this: [d]ProjectDir main.cpp Makefile

Re: run make! from subdirs

2007-02-20 Thread James Kanze
On 2/20/07, 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. But if I have directory

Re: run make! from subdirs

2007-02-20 Thread Wolfgang Schmidt
Hi Ilia, to me it looks like you always want to compile using the Makefile in ProjectDir. I don't know if this helps much, but I would recommend to open the Makefile in one buffer, then hide it: :hid and do your source editing. When you want to compile your files, use :sb Maktab to

Re: run make! from subdirs

2007-02-20 Thread hermitte
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

Re: run make! from subdirs

2007-02-20 Thread Yakov Lerner
On 2/20/07, Ilia N Ternovich [EMAIL PROTECTED] wrote: Hi! 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. But if I have directory