sponsor Vim development Vim logo Vim Book Ad

basic Tip #203: Make make more helpful

 tip karma   Rating 61/19, Viewed by 1985 

created:   January 27, 2002 6:34      complexity:   basic
author:   Padraic Renaghan      as of Vim:   6.0

I find this a very useful command to use.
Add the below 4 lines to your vimrc.
Then instead of "make" use "Make".

" Command Make will call make and then cwindow which
" opens a 3 line error window if any errors are found.
" if no errors, it closes any open cwindow.
:command -nargs=* Make make <args> | cwindow 3

 rate this tip  Life Changing Helpful Unfulfilling 

<<debugging window autocommands | Some mappings for using cscope with vim. >>

Additional Notes

Anonymous, January 27, 2002 20:21
great
[email protected], January 29, 2002 6:01
since typing :Make is a bit troublesome compared to :make (which i also find a bit tiresome :)) i have a mapping:

:map <Leader>j :Make<cr>

then, just hit \j and away you go.
Chad, June 17, 2002 13:59
Great tip.  I came to this site looking exactly for this information (like I can remember the errors w/out seeing them :-)).  Thanks alot.
[email protected], October 18, 2002 6:17
Chad: with :cc you can see the current error and with
:cn and :cp you can switch between the errors.
vim even goes to the position in sourcecode where they
occured.
[email protected], January 13, 2003 10:14
Does anybody know how to display a complete error message that is too long for the line?  By default it inserts ellipsys in the middle of it and only displays the beginning and the end...
Thanks a bunch.
EZ
[email protected], April 7, 2004 8:38
:clist
will display the complete line, unfortuneately it displays every other error as well
[email protected], August 20, 2004 23:54
Hi I am trying to get efm_perl.pl working so that I can compile inside of vim without going to the shell and doing a perl -cw [filename]. I found this efm_perl.pl script that tells me to put these two lines in my vimrc:

set makeprg=$HOME/bin/vimparse.pl\ -c\ %\ $*
set errorformat=%f:%l:%m

I get that. But where is the file fimparse.pl? Or is that just for output?  I couldn't find it anywhere. I think I am being stupid. :)
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 [email protected] after searching the archive. Help Bram help Uganda.
Sponsored by Web Concept Group Inc. SourceForge Logo