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
  [dir]SrcDir1
         file1.cpp
  [dir]SrcDir2
         file2.cpp

this command do not work. Makefile is located in root ProjectDir and if I
open for example file1.cpp from SrcDir1, vim can't locate Makefile and I
HAVE TO SWITCH TO ANOTHER BUFFER which contains some source from
ProjectDir in order to compile program...

Is there any opportunity to solve this situation. I have to recompile
project very often while debug sessions, and there is really huge dir
hierarchy...  

 -- 
God bless you!
Ilia

2.6.19-gentoo-r5 AMD Athlon(tm) XP 2600+

mailto: [EMAIL PROTECTED]
icq: 198233378

VegaTrek Developer: http://wcuniverse.sourceforge.net/vegatrek/
VegaTrek Forum Moderator:
http://vegastrike.sourceforge.net/forums/viewforum.php?f=13
============================================================================
You know you're using the computer too much when: you almost every night
have a dream about an neverending emerge, and you dont have a clue about
what's beeing emerged. -- geniux
============================================================================
$gpg --keyserver cryptonomicon.mit.edu --search-keys tillias

Reply via email to