Michael Lamb wrote: > >> I've put some spare time into an errorformat string and a filter > >> script which makes plain-old javac compilation nicer than the > >> examples from :help errorformat-javac > > > > Assuming this works well, it's only for Unix. Thus I would add it > > to ":help errorformat-javac" instead of replacing the existing > > example. > > I intended neither but I'd be happy for the former. It's not a > significant change, so feel free to omit my name for brevity.
I like to keep the name in, so that when later changes are suggested we know who wrote the original. > If you're going to add this to the help files where lots of people will > read it, let me be a bit more professional. I've made minor language > changes to your modification of my text, below. > > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > Here is an alternative for Unix that filters the errors first: > > :setl errorformat=%Z%f:%l:\ %m,%A%p^,%-G%*[^sl]%.%# > :setl makeprg=javac\ %\ 2>&1\ \\\|\ vim-javac-filter > > You need to put the following in "vim-javac-filter" somewhere in your > path (e.g., in ~/bin) and make it executable: > > #!/bin/sed -f > /\^$/s/\t/\ /g;/:[0-9]\+:/{h;d};/^[ \t]*\^/G; > > In English, that sed script: > - Changes single tabs to single spaces and > - Moves the line with the filename, line number, error message to just > after the pointer line. That way, the unused error text between > doesn't break vim's notion of a "multi-line message" and also > doesn't force us to include it as a "continuation of a multi-line > message." > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Thanks for the update. Only the last two items changed, right? > I was concerned about this not being a cross-platform solution. I'd be > delighted if there were a more elegant (pure-vim) method. Is there a way > to have some vimscript modify the errorfile before parsing? Currently not. Now that Vim script is powerful enough for this it would be a good idea to add it. Don't know how it would work exactly. -- BLACK KNIGHT: I'm invincible! ARTHUR: You're a looney. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ download, build and distribute -- http://www.A-A-P.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///