まず、デバッグについて説明します。残念ながら、特に簡単な方法はありませんが、make を実行して出力をファイルに出力し、次に:
:let &makeprg="cat ~/outputfile.log"
:make
エラーフォーマットの作成に関しては、少し試行錯誤が必要です。複数行のメッセージには %A、%C、および %Z を使用でき、%-G を使用して内容を無視できます。順序は非常に重要です。%C または %Z が %A の前に来る場合があることに注意してください。あなたの場合、以下のefmでどこかに到達できるかもしれません。すべてのスペースや引用符をエスケープする必要がなく、徐々に構築できるため、set ではなくlet &efm =
andを使用する傾向があります。let &efm .=
また、はるかに読みやすくなっています。
" Start of the multi-line error message (%A),
" %p^ means a string of spaces and then a ^ to
" get the column number
let &efm = '%A%p^' . ','
" Next is the main bit: continuation of the error line (%C)
" followed by the filename in quotes, a comma (\,)
" then the rest of the details
let &efm .= '%C"%f"\, line %l: error(%n): %m' . ','
" Next is the last line of the error message, any number
" of spaces (' %#': equivalent to ' *') followed by a bit
" more error message
let &efm .= '%Z %#%m' . ','
" This just ignores any other lines (must be last!)
let &efm .= '%-G%.%#'