Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!apple!mips!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!uflorida!novavax!hcx1!brad From: brad@SSD.CSD.HARRIS.COM (Brad Appleton) Newsgroups: comp.unix.questions Subject: Integrated editing and compiling with vi Summary: Any scripts to do it? Keywords: vi, awk/sed/perl, error message parsing & inserting Message-ID: <3661@hcx1.SSD.CSD.HARRIS.COM> Date: 8 Apr 90 17:15:49 GMT References: <3620@hcx1.SSD.CSD.HARRIS.COM> <9000029@m.cs.uiuc.edu> Sender: news@hcx1.SSD.CSD.HARRIS.COM Organization: Harris Computer Systems, Fort Lauderdale, FL Lines: 33 There is/was a thread in comp.lang.c (which should be redirected here IMHO) about integrating compiling and editing with Unix! Peter De Silva has shown a nifty vi map command that will compile the current source file and append the messages to the vi session when done compiling! Now, I am not fortunate enough to have a program called error(1) like some of you people do (esp. those with Suns). What I would like to see is a vi map command that does the following (without leaving vi of course): 1) write the current file 2) invoke make/cc, piping error output to a script which inserts the error messages into the source file after the offending source line 3) re-sync vi to edit the newly modified file 4) search to the first error message! Obviously, the hard part here is the script! I would like it to use any or all of ksh (or sh), sed, awk, perl. I would also like the script to be no longer than 100-200 lines. The script should also embed each error message in some fairly unique pattern that is easy to search for, and then embed all this within a comment (e.g. /*%%% ###*/ ). Any scripts that can do this without needing to know the compiler and/or source language are not required but would be especially brilliant. I do NOT want a C program (I have one already). Please do not tell me how emacs can already do all this - I know that. Please send e-mail! Post only if your e-mail bounces! I will summarize. advTHANXance, -=-=-=-=-=-=-=-=-=-=-= "And miles to go before I sleep." =-=-=-=-=-=-=-=-=-=-=- Brad Appleton Harris Computer Systems brad@ssd.csd.harris.com (305) 973-5007 Fort Lauderdale, FL USA {uunet,novavax}!hcx1!brad -=-=-=-=-=-=-=-=-=-= Disclaimer: I said it, not my company! -=-=-=-=-=-=-=-=-=-