"Peng Yu" <[EMAIL PROTECTED]> 写于 2006-10-14 05:59:29: > Hi, > > Currently, I use F12 to map to make command. However, the cursor will > jump to the file which contains the first error or the first warning. > It will leave the current file that I'm editing if it is different > from the file contain the errors or warnings. Another drawback, is > that the error message window should be gone before I can do any > editing in the source files. > > map <F12> <ESC>:w<kEnter>:make<kEnter> > > The plugin c.vim : C/C++-IDE > http://vim.sourceforge.net/scripts/script.php?script_id=213 > seems very interesting. It is building "save and compile" command can > preserve the error window just like any other IDE (eclipse, > visual-studio). However, it can only compile single. My project is > rather complex and it is compiled by the make command. > > Can some body provide some script to satisfy my more general > requirement? I want press <F12>, then make is called. The error window > will not be closed unless I do so. When I brower the error, the file > where the error is from will be open automatically and the cursor is > put in the error line? > > Thanks, > Peng
Hi, I know nothing about the "C++IDE plugin", but I bet what you need is the 'makeprg' option, see :h 'makeprg' If you :set makeprg=/usr/bin/make Chances are that your problem will solved. However, if the "C++IDE" plugin are trying to use something other than 'makeprg', then IMO the plugin author should revise the script. HTH. -- Sincerely, Pan, Shi Zhu. ext: 2606
