Run make from command line and open Vim on errors
From Vim Tips Wiki
(Redirected from VimTip219)
Tip 219 Previous Next Created: February 22, 2002 Complexity: basic Author: scott urban Version: 5.7
A simple alias (*csh) or shell function (bash) will let you run make from your shell, then automatically open vim or gvim on the errors (if there were any):
csh or tcsh:
alias Make 'make \!* |& tee make.errors || gvim -q make.errors -c :copen'
bash:
Make () { command make "$@" |& tee make.errors || gvim -q make.errors -c :copen ; }
If you use vanilla sh or ksh or even cmd.exe, you can probably do the same - add a note if you have ideas.
